Skip to content

Commit 366f4be

Browse files
KaigeFuwenlingz
authored andcommitted
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 <like.yan@intel.com> Signed-off-by: Kaige Fu <kaige.fu@intel.com>
1 parent 1e192f0 commit 366f4be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/tools/acrntrace/scripts/vmexit_analyze.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def generate_report(ofile, freq):
174174

175175
print ("Total run time: %d cycles" % (rt_cycle))
176176
print ("TSC Freq: %s MHz" % (freq))
177-
print ("Total run time: %d sec" % (rt_sec))
177+
print ("Total run time: %.6f sec" % (rt_sec))
178178

179179
f_csv.writerow(['Run time(cycles)', 'Run time(Sec)', 'Freq(MHz)'])
180180
f_csv.writerow(['%d' % (rt_cycle),

0 commit comments

Comments
 (0)