-
Notifications
You must be signed in to change notification settings - Fork 401
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
Introduce benchmarking using Criterion. #110
Conversation
a0238b0
to
58246d2
Compare
benches/benches.rs
Outdated
mod suites; | ||
use suites::*; | ||
|
||
criterion_main!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default sample size for the criterion is 100, maybe we can use a smaller sample size like 10 to reduce the benchmark time.
CI failed @Hoverbear |
cea2462
to
75625ba
Compare
e9a2340
to
ecc28dd
Compare
PTAL @breeswish |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Your code arrangement is pretty well :) Mostly LGTM!
benches/benches.rs
Outdated
|
||
fn main() { | ||
criterion::init_logging(); | ||
let _ = env_logger::try_init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be duplicated? criterion::init_logging will use a SimpleLogger to initialize log
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice catch. :)
ecc28dd
to
c6dc9d7
Compare
@breeswish Thanks, I resolved your comment. PTAL again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Starts on #109.
This demonstrates Criterion, ways to bench cleanly, and documentation how to use it.