-
Notifications
You must be signed in to change notification settings - Fork 121
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
add benchmarking tests as in state_changes module #184
add benchmarking tests as in state_changes module #184
Conversation
benches/state_space.rs
Outdated
criterion_group!(benches, criterion_benchmark); | ||
criterion_main!(benches); | ||
|
||
mod bench_funcs { |
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.
Lets remove this additional module and just put any helper functions directly the existing mod.
benches/state_space.rs
Outdated
|
||
/// Duplicated helper method entirely as in `state_space::tests` module | ||
/// Reason of duplication: to retain encapsulation | ||
async fn add_state_change_to_cache( |
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.
Instead of adding this function, lets just mark the existing function in src/state_space/mod.rs
as pub
.
benches/state_space.rs
Outdated
Ok(()) | ||
} | ||
|
||
/// Duplicated method test from `state_change::tests` module |
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.
Same thing here lets dedup this function and expose whatever is necessary in the state space module.
benches/state_space.rs
Outdated
Ok(()) | ||
} | ||
|
||
/// Duplicated method test from `state_change::tests` module |
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.
Same thing here
Hey thanks for the PR and sorry for the delay! I added a few quick comments. Let me know if you have any thoughts/questions. |
@0xKitsune Changes applied based on your comments |
Motivation
In benches module there was a "TODO" to add state change benchmarking tests, which I did.
Solution
Simple benchmarking tests added as in
state_change::tests
module.PR Checklist
Bench Output
Here's the results on my machine on
cargo bench
call: