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>
This commit is contained in:
Kaige Fu 2019-11-29 00:43:10 +08:00 committed by wenlingz
parent 1e192f05d7
commit 366f4be454

View File

@ -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),