Giter VIP home page Giter VIP logo

Comments (5)

wasnotrice avatar wasnotrice commented on September 2, 2024 1

well, unit.ex is gone now, so I guess it's moot!

re: aliasing, hahaha! yes, I should make an iex.exs file so I can stop complaining

from benchee.

PragTob avatar PragTob commented on September 2, 2024

Hey :)

I like the directory structure to reflect the module hierarchy. This is one of the main reasons why I'd probably like to stick with the unit name space. It all goes neatly into a folder and it adds some context. For Benchee.Duration one could otherwise think that it is the one measuring the duration.

Moreover, I feel like the units are not a primary concern of Benchee. It's great to have and I'm even reusing it right now in the HTML/plotly_js formatter, but I could also imagine those coming from a separate library.

Funnily enough, when I first reviewed your PR I was thinking that I wouldn't have put them into their own namespace but found it to be nicer.

Not set on this though, happy to be convinced otherwise :)
Tobi

from benchee.

wasnotrice avatar wasnotrice commented on September 2, 2024

I'm ok with the namespace. Maybe just feeling too lazy to type it. I agree that Benchee.Duration could be confused with a measure of duration, although I don't think it's incorrect/misleading to use Benchee.Duration to name a collection of functions for dealing with numbers representing duration.

I also agree that keeping this concern in its own directory emphasizes the fact that the functions are all helpers and not core.

So here's a taste questions for you: how do you feel about movingunit.ex inside the unit directory? In Ruby there is some reason for having it as a sibling of the unit directory, but here it just seems out of place, since there's no technical reason for having a unit-related file outside of unit.

I'm still trying to figure out the best approach for this sort of thing in Elixir 😀

from benchee.

PragTob avatar PragTob commented on September 2, 2024

Ha! Interesting point, my ruby instincts tell me to leave it outside of the dir, but can't argue with your reasoning. Let's move it inside the directory and see how we like it?

  • about the name typing, feel free to alias Benche.Unit.Duration at will :)

from benchee.

wasnotrice avatar wasnotrice commented on September 2, 2024

Closing because we have decided to maintain the hierarchy

from benchee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.