simplify stored execution times per testcase

This commit is contained in:
Alwin Berger 2024-10-10 16:33:19 +02:00
parent bae801c620
commit 2ca6fdf538

View File

@ -215,6 +215,7 @@ pub struct ClockTimeFeedback {
impl<S> Feedback<S> for ClockTimeFeedback
where
S: State + UsesInput + MaybeHasClientPerfMonitor + HasMetadata,
<S as UsesInput>::Input: Default
{
#[allow(clippy::wrong_self_convention)]
fn is_interesting<EM, OT>(
@ -231,20 +232,15 @@ where
{
#[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();
if let Some(time) = observer.worst_job_instances.get(t) {
self.exec_time = Some(Duration::from_nanos(*time));
return Ok(false);
} else {
self.exec_time = Some(Duration::from_nanos(0));
return Ok(false);
}
self.exec_time = Some(Duration::from_nanos(observer.last_runtime()));
return Ok(false)
}
}
// TODO Replace with match_name_type when stable
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)
}