Comments (3)
It's entirely possible that repro case may not 100% repro as written on random machines. It looks like the number of elements & maybe the speed of the machine is relevant (I'm running that benchmark on a 13900K).
I'm curious if my absolutely blind ignorant hunch is that there's integer math somewhere that ends up with a 0 due to some integer division and is then the numerator for a floating point operation which results in a NaN. I'd love to help track down the bug but I don't know where to start.
from criterion.rs.
So tracked this down a bit further. Looks like the values being plotted are all the same. This results in a stddev of 0 when estimating the KDE bandwidth within criterion::kde::sweep_and_estimate
which results in a bandwidth of 0 which problematic because bandwidth is in the denominator & hence the NaN suddenly appearing. Not sure why all the samples have exactly the same value though...
from criterion.rs.
Hah. There's even a comment trying to address this.
116 // prevent gnuplot bug when all values are equal
117 let elapsed = vec![t_prev, t_prev + 0.000001].into_boxed_slice();
Likely what's happening is that when values are large (in my case the test is taking 30s), the + 0.000001
does nothing.
Replacing it with
let elapsed = vec![t_prev, next_up(t_prev)].into_boxed_slice();
where next_up is ported from the std library fixes the issue I think (at least for this repro that I have).
from criterion.rs.
Related Issues (20)
- Where are baselines saved / is there a command to list saved baselines ? HOT 2
- Configuration via env variables
- Huge variance between successive bench runs without code changes. HOT 1
- Bench with huge input
- Unstable feature crate attribute not recognized in different modules
- Sample size scaling for running in CI HOT 1
- how to call async functions during setup process? HOT 1
- incorrect doc for iter_batched_ref
- profiling with iter_batched_ref
- AsyncBencher::iter_batched and iter_batched_ref should allow for async setup HOT 1
- [Question] Any idea to support multi threaded routine call for throughput test? HOT 1
- --profile-time doesn't work HOT 1
- panic in drop
- Custom Iter with async setup and non-async benched value
- "cargo bench -- <filter>" does not actually filter the benchmarks
- Can't call a function for the benchmark from the crate inside a Rust workspace HOT 1
- Quickstart instructions still use criterion 0.4
- Benchmarking With One function result as Input
- Help needed? HOT 5
- Found argument '--bench' which wasn't expected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from criterion.rs.