bencheeorg / benchee

Easy and extensible benchmarking in Elixir providing you with lots of statistics!
MIT License
1.42k stars 66 forks source link

Scale estimaed run time duration #62

Closed PragTob closed 7 years ago

PragTob commented 7 years ago

Right now when you run a slightly more thorough benchmark with increased times or multiple inputs the estimated time shows up with many seconds:

tobi@speedy ~/github/elixir_playground $ mix run bench/tco_blog_post.exs 
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
Elixir 1.4.0
Benchmark suite executing with the following configuration:
warmup: 10.0s
time: 10.0s
parallel: 1
inputs: none specified
Estimated total run time: 120.0s

It'd be nice to use the automatic unit scaling to show 2mins or something similar in cases like this (of course even more so with cases like 360s).

Scaling can be fun in Benchee.Conversion.Duration while the printing is a part of Benchee.Output.BenchmarkPrinter :)

h4cc commented 7 years ago

Could a external library be used to solve this?

PragTob commented 7 years ago

No, as we already have functionality for this internally :) It's right along the use case of Duration and the Scale module and behaviour.