From 366f4be454ff5ea912ca95ad1ad76708c3dc9f84 Mon Sep 17 00:00:00 2001 From: Kaige Fu Date: Fri, 29 Nov 2019 00:43:10 +0800 Subject: [PATCH] acrntrace: Use correct format for total run time It is better to output it using float instead of int. Otherwise, we will get '0 sec' for total run time if it is less than one second. Tracked-On: #4175 Acked-by: Yan, Like Signed-off-by: Kaige Fu --- misc/tools/acrntrace/scripts/vmexit_analyze.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/tools/acrntrace/scripts/vmexit_analyze.py b/misc/tools/acrntrace/scripts/vmexit_analyze.py index 5f0831d7b..4701ed335 100755 --- a/misc/tools/acrntrace/scripts/vmexit_analyze.py +++ b/misc/tools/acrntrace/scripts/vmexit_analyze.py @@ -174,7 +174,7 @@ def generate_report(ofile, freq): print ("Total run time: %d cycles" % (rt_cycle)) print ("TSC Freq: %s MHz" % (freq)) - print ("Total run time: %d sec" % (rt_sec)) + print ("Total run time: %.6f sec" % (rt_sec)) f_csv.writerow(['Run time(cycles)', 'Run time(Sec)', 'Freq(MHz)']) f_csv.writerow(['%d' % (rt_cycle),