simplify stored execution times per testcase
This commit is contained in:
parent
bae801c620
commit
2ca6fdf538
@ -215,6 +215,7 @@ pub struct ClockTimeFeedback {
|
|||||||
impl<S> Feedback<S> for ClockTimeFeedback
|
impl<S> Feedback<S> for ClockTimeFeedback
|
||||||
where
|
where
|
||||||
S: State + UsesInput + MaybeHasClientPerfMonitor + HasMetadata,
|
S: State + UsesInput + MaybeHasClientPerfMonitor + HasMetadata,
|
||||||
|
<S as UsesInput>::Input: Default
|
||||||
{
|
{
|
||||||
#[allow(clippy::wrong_self_convention)]
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn is_interesting<EM, OT>(
|
fn is_interesting<EM, OT>(
|
||||||
@ -231,20 +232,15 @@ where
|
|||||||
{
|
{
|
||||||
#[cfg(feature="trace_job_response_times")]
|
#[cfg(feature="trace_job_response_times")]
|
||||||
{
|
{
|
||||||
if let Some(t) = &self.select_task {
|
if self.select_task.is_some() {
|
||||||
let observer = observers.match_name::<QemuSystemStateObserver<S::Input>>("systemstate").unwrap();
|
let observer = observers.match_name::<QemuSystemStateObserver<S::Input>>("systemstate").unwrap();
|
||||||
if let Some(time) = observer.worst_job_instances.get(t) {
|
self.exec_time = Some(Duration::from_nanos(observer.last_runtime()));
|
||||||
self.exec_time = Some(Duration::from_nanos(*time));
|
return Ok(false)
|
||||||
return Ok(false);
|
|
||||||
} else {
|
|
||||||
self.exec_time = Some(Duration::from_nanos(0));
|
|
||||||
return Ok(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO Replace with match_name_type when stable
|
// TODO Replace with match_name_type when stable
|
||||||
let observer = observers.match_name::<QemuClockObserver>(self.name()).unwrap();
|
let observer = observers.match_name::<QemuClockObserver>(self.name()).unwrap();
|
||||||
self.exec_time = Some(Duration::from_nanos(observer.last_runtime() << QEMU_ICOUNT_SHIFT)); // Assume a somewhat realistic multiplier of clock, it does not matter
|
self.exec_time = Some(Duration::from_nanos(observer.last_runtime()));
|
||||||
Ok(false)
|
Ok(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user