summaryrefslogtreecommitdiffstats
path: root/unit_trace/gedf_inversion_stat_printer.py
diff options
context:
space:
mode:
authorMac Mollison <mollison@cs.unc.edu>2010-04-03 23:34:12 -0400
committerMac Mollison <mollison@cs.unc.edu>2010-04-03 23:34:12 -0400
commitcab2f0c8cc8c05bee65ae41c139c191c7d8acd48 (patch)
tree18b670b86c393f473690e5d96922cf684d58b049 /unit_trace/gedf_inversion_stat_printer.py
parent808ff90c55db21813967af8a814b61f520fdaff7 (diff)
Print priority inversion durations in ms
Diffstat (limited to 'unit_trace/gedf_inversion_stat_printer.py')
-rw-r--r--unit_trace/gedf_inversion_stat_printer.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/unit_trace/gedf_inversion_stat_printer.py b/unit_trace/gedf_inversion_stat_printer.py
index 42a16f0..c35632a 100644
--- a/unit_trace/gedf_inversion_stat_printer.py
+++ b/unit_trace/gedf_inversion_stat_printer.py
@@ -51,10 +51,12 @@ def gedf_inversion_stat_printer(stream,num):
51 avg_inversion = 0 51 avg_inversion = 0
52 52
53 # Print out our information 53 # Print out our information
54 # NOTE: Here, we assume nanoseconds as the time unit.
55 # May have to be changed in the future.
54 print "Num inversions: %d" % (num_inversions) 56 print "Num inversions: %d" % (num_inversions)
55 print "Min inversion: %d" % (min_inversion) 57 print "Min inversion: %f ms" % (float(min_inversion) / 1000000)
56 print "Max inversion: %d" % (max_inversion) 58 print "Max inversion: %f ms" % (float(max_inversion) / 1000000)
57 print "Avg inversion: %d" % (avg_inversion) 59 print "Avg inversion: %f ms" % (float(avg_inversion) / 1000000)
58 for inv in longest_inversions: 60 for inv in longest_inversions:
59 print "" 61 print ""
60 print "Inversion record IDs: (%d, %d)" % (inv.inversion_start_id, 62 print "Inversion record IDs: (%d, %d)" % (inv.inversion_start_id,
@@ -63,8 +65,10 @@ def gedf_inversion_stat_printer(stream,num):
63 (inv.inversion_start_triggering_event_id, 65 (inv.inversion_start_triggering_event_id,
64 inv.triggering_event_id)) 66 inv.triggering_event_id))
65 print "Time: %d" % (inv.job.inversion_end) 67 print "Time: %d" % (inv.job.inversion_end)
66 print "Duration: %d" % ( 68 # NOTE: Here, we assume nanoseconds as the time unit.
67 inv.job.inversion_end - inv.job.inversion_start) 69 # May have to be changed in the future.
70 print "Duration: %f ms" % (
71 float(inv.job.inversion_end - inv.job.inversion_start) / 1000000)
68 print "Job: %d.%d" % (inv.job.pid,inv.job.job) 72 print "Job: %d.%d" % (inv.job.pid,inv.job.job)
69 print "Deadline: %d" % (inv.job.deadline) 73 print "Deadline: %d" % (inv.job.deadline)
70 print "" 74 print ""