Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout error when running benchmarks #71

Closed
devonestes opened this issue May 1, 2017 · 4 comments · Fixed by #73
Closed

timeout error when running benchmarks #71

devonestes opened this issue May 1, 2017 · 4 comments · Fixed by #73
Assignees
Labels
Milestone

Comments

@devonestes
Copy link
Collaborator

Guten Tag!

It's probably not a big deal, but I was running some benchmarks just now, and on one run I got the following timeout error from Task.await.

$ mix run code/general/map_lookup_vs_pattern_matching.exs
Elixir 1.4.2
Erlang 19.2.3
Benchmark suite executing with the following configuration:
warmup: 2.0s
time: 10.0s
parallel: 1
inputs: none specified
Estimated total run time: 24.0s

Benchmarking Map Lookup...
Benchmarking Pattern Matching...
** (exit) exited in: Task.await(%Task{owner: #PID<0.70.0>, pid: #PID<0.174.0>, ref: #Reference<0.0.1.458>}, 5000)
    ** (EXIT) time out
    (elixir) lib/task.ex:416: Task.await/2
    lib/benchee/utility/map_value.ex:45: anonymous fn/1 in Benchee.Utility.MapValues.p_map_values/2
    (elixir) lib/enum.ex:1229: Enum."-map/2-lists^map/1-0-"/2
    lib/benchee/utility/map_value.ex:44: Benchee.Utility.MapValues.p_map_values/2
    lib/benchee/statistics.ex:68: Benchee.Statistics.statistics/1
    lib/benchee.ex:36: Benchee.do_run/2

I ran the same task again right after and it worked just fine, so it's a transient issue. I figured I'd file the error just so you were aware, but clearly it's not really that much of an issue since it fixes itself. However, if there's anything else I can do to help shed some light on this, then let me know and I'll send along whatever I can!

@PragTob PragTob added the bug label May 1, 2017
@PragTob
Copy link
Member

PragTob commented May 1, 2017

Thanks a ton!!!!!! ❤️

This is great, really keep it up even with little things. Otherwise I'd never know. These issues are super valuable as a maintainer, which is why I always wonder why not more people open a bunch of bugs in OSS projects because there's definitely a tone of them.

This is a new usage of Task.await introduced for calculating statistics in parallel. I suppose you do rather micro benchmarks for statistics calculations to take more than 5 seconds?

Will set it to infinity as well. :)

Also while not grave, certainly annoying. I might cut a new release sooner than I originally planned to :D

@PragTob
Copy link
Member

PragTob commented May 1, 2017

Fixed on master, although I'm not sure you wanna use master yet as it breaks the other formatters (HTML etc.) right now as one main key was renamed - shouldn't be too long though ;P

@devonestes
Copy link
Collaborator Author

Awesome - happy to help!

Yeah, I was benchmarking some pretty fast stuff. Here was the second successful run for your reference:

$ mix run code/general/map_lookup_vs_pattern_matching.exs
Elixir 1.4.2
Erlang 19.2.3
Benchmark suite executing with the following configuration:
warmup: 2.0s
time: 10.0s
parallel: 1
inputs: none specified
Estimated total run time: 24.0s

Benchmarking Map Lookup...
Benchmarking Pattern Matching...

Name                       ips        average  deviation         median
Pattern Matching      726.52 K        1.38 μs   ±376.42%        1.20 μs
Map Lookup            455.62 K        2.19 μs   ±185.63%        1.90 μs

Comparison:
Pattern Matching      726.52 K
Map Lookup            455.62 K - 1.59x slower

Thanks again for the awesome library! I look forward to helping more in a week or so once I get my open source time back 😄

@PragTob
Copy link
Member

PragTob commented May 1, 2017

Cool stuff! But damn that standard deviation... Wish I had implemented #50 again so the console formatter could show min/max and sample size. Or the nth percentile thing. So much to do :D

Your talk is next week, right? Good luck + much success!

If you do more complex stuff in the benchmarking functions, #70 might be interesting to you. If you try it out, the difference would be interesting for me to see :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants