driver: more precisely measure stimuli "prep"

i'm beginning to think the `threadpool` library is actually just kinda
slow.
This commit is contained in:
2022-08-22 02:32:58 -07:00
parent 4df6e19abe
commit 7bce17f56b
2 changed files with 4 additions and 6 deletions

View File

@@ -62,8 +62,7 @@ impl Diagnostics {
let render_prep_time = self.time_prepping_render.as_secs_f64();
let stim_block_time = self.time_blocked_on_stim.as_secs_f64();
let render_block_time = self.time_blocked_on_render.as_secs_f64();
// "stimuli prep" includes any blocking operations
let stim_prep_time = self.time_prepping_stim.as_secs_f64() - stim_block_time;
let stim_prep_time = self.time_prepping_stim.as_secs_f64();
let other_driver_time = driver_time - (
step_time + stim_block_time + stim_prep_time + render_block_time + render_prep_time

View File

@@ -273,11 +273,10 @@ where
let steps_this_time = (step_to - start_step).try_into().unwrap();
let meta = self.state.meta();
let stim = self.diag.instrument_stimuli_prep(|| {
let stim = self.stimuli.get_for(meta, start_step);
// prefetch the next stimulus, in the background.
let stim = self.stimuli.get_for(meta, start_step);
// prefetch the next stimulus, in the background.
self.diag.instrument_stimuli_prep(|| {
self.stimuli.start_job(meta, step_to);
stim
});
trace!("step begin");