Blame SOURCES/bz1791792-3-stats-Use-nanoseconds-from-epoch-for-schedmiss.patch

354091
From ebd05fa00826c366922e619b012a0684c6856539 Mon Sep 17 00:00:00 2001
354091
From: Jan Friesse <jfriesse@redhat.com>
354091
Date: Thu, 23 Jan 2020 17:11:54 +0100
354091
Subject: [PATCH] stats: Use nanoseconds from epoch for schedmiss
354091
354091
Using monotonic time is not working because it doesn't have to match
354091
time from epoch.
354091
354091
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
354091
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
354091
---
354091
 exec/main.c | 3 ++-
354091
 1 file changed, 2 insertions(+), 1 deletion(-)
354091
354091
diff --git a/exec/main.c b/exec/main.c
354091
index fb0486e..821d97e 100644
354091
--- a/exec/main.c
354091
+++ b/exec/main.c
354091
@@ -836,7 +836,8 @@ static void timer_function_scheduler_timeout (void *data)
354091
 		    "(threshold is %0.4f ms). Consider token timeout increase.",
354091
 		    (float)tv_diff / QB_TIME_NS_IN_MSEC, (float)timeout_data->max_tv_diff / QB_TIME_NS_IN_MSEC);
354091
 
354091
-		stats_add_schedmiss_event(tv_current / 1000, (float)tv_diff / QB_TIME_NS_IN_MSEC);
354091
+		stats_add_schedmiss_event(qb_util_nano_from_epoch_get() / QB_TIME_NS_IN_MSEC,
354091
+		    (float)tv_diff / QB_TIME_NS_IN_MSEC);
354091
 	}
354091
 
354091
 	/*
354091
-- 
354091
1.8.3.1
354091