-
Notifications
You must be signed in to change notification settings - Fork 2
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
Measure execution times of streams #214
Conversation
src/bin/server.rs
Outdated
// drop actor handle to initiate shutdown | ||
drop(handle); | ||
|
||
println!( | ||
"Total time for {} iterations: {:?}", | ||
N_BATCHES - 1, | ||
total_time.elapsed() - batch_times | ||
); | ||
|
||
// Clean up server tasks, then wait for them to finish | ||
background_tasks.abort_all(); | ||
tokio::time::sleep(Duration::from_secs(5)).await; | ||
|
||
// Check for background task hangs and shutdown panics | ||
background_tasks.check_tasks_finished(); | ||
|
||
Ok(()) |
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.
Idk if we need a "clean" shutdown for the Server actor, by putting the loop in a try
able block and doing the shutdown here on error?
src/server/actor.rs
Outdated
$manager.record_event($streams, &evt0); | ||
$block | ||
$manager.record_event($streams, &evt1); | ||
$map.insert($label, vec![evt0, evt1]); |
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.
do you want something like $map.entry($label).or_default().extend(&[evt0, evt1])
. I think atm you override the dot_events in each batch iteration.
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 right, mistake
src/server/actor.rs
Outdated
.windows(2) | ||
.step_by(2) |
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.
This is simulating chunks(2)?
I also touched a few of the |
Measures and aggregates execution times of GPU workload. This is useful for benchmarking and production monitoring.
TODO (followup PR): send this to datadog as a gauge metric