From ce78950f4b3b338c4be11d5efc67a99e47496680 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Mon, 7 Dec 2020 13:57:34 +0000 Subject: [PATCH] base: Print out info about the total noise When checking for noise in the experiment to verify there was minimal interference, we do the check against the total noise in the system but only print out the info about the noisiest task. In latest integration branch, RampDown:test_task_placement is undecided in one case although the noisiest task is 0.24% and the threshold is 1%. This pattern is repeated, hence we need to print out more info about the total noise to help with the diagnosis. Signed-off-by: Qais Yousef --- lisa/tests/base.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisa/tests/base.py b/lisa/tests/base.py index 4b46c0fdd..9760d4276 100644 --- a/lisa/tests/base.py +++ b/lisa/tests/base.py @@ -1330,6 +1330,8 @@ class RTATestBundle(FtraceTestBundle, DmesgTestBundle): if noise_threshold_ms is not None: threshold_s = min(threshold_s, noise_threshold_ms * 1e3) + threshold_pct = threshold_s * 100 / self.trace.time_range + df = self.trace.analysis.tasks.df_tasks_runtime() # We don't want to account the test tasks @@ -1366,7 +1368,9 @@ class RTATestBundle(FtraceTestBundle, DmesgTestBundle): if df_noise.empty: return ResultBundle.from_bool(True) - res = ResultBundle.from_bool(df_noise['runtime'].sum() < threshold_s) + total_noise_duration_s = df_noise['runtime'].sum() + total_noise_duration_pct = df_noise['runtime_pct'].sum() + res = ResultBundle.from_bool(total_noise_duration_s < threshold_s) pid = df_noise.index[0] comm = df_noise['comm'].iloc[0] @@ -1379,6 +1383,12 @@ class RTATestBundle(FtraceTestBundle, DmesgTestBundle): "duration (rel)": TestMetric(duration_pct, "%")} res.add_metric("noisiest task", metric) + metric = {"total noise duration (abs)": TestMetric(total_noise_duration_s, "s"), + "total noise duration (rel)": TestMetric(total_noise_duration_pct, "%"), + "threshold duration (abs)": TestMetric(threshold_s, "s"), + "threshold duration (rel)": TestMetric(threshold_pct, "%")} + res.add_metric("total noise", metric) + return res @classmethod -- GitLab