diff options
author | Gary Bressler <garybressler@nc.rr.com> | 2010-02-25 12:04:02 -0500 |
---|---|---|
committer | Gary Bressler <garybressler@nc.rr.com> | 2010-02-25 12:04:02 -0500 |
commit | d7dfc575f9a1a5a0117cab591c6284b1f1844dcf (patch) | |
tree | 0ed3ebbe43138ecaf67d070bfd4c9614dd511f08 /gedf_test.py | |
parent | 75dedea2014c9ea703bb4000fbfda45c20b196e5 (diff) |
This commit of unit-trace converts it to Python2 from Python3, so that it
can operate with the visualizer, which uses Python2.
Diffstat (limited to 'gedf_test.py')
-rw-r--r-- | gedf_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gedf_test.py b/gedf_test.py index 5a3c0c4..8457901 100644 --- a/gedf_test.py +++ b/gedf_test.py | |||
@@ -80,7 +80,7 @@ def gedf_test(stream): | |||
80 | ############################################################################### | 80 | ############################################################################### |
81 | 81 | ||
82 | # Internal representation of a Job | 82 | # Internal representation of a Job |
83 | class Job(): | 83 | class Job(object): |
84 | def __init__(self, record): | 84 | def __init__(self, record): |
85 | self.pid = record.pid | 85 | self.pid = record.pid |
86 | self.job = record.job | 86 | self.job = record.job |
@@ -89,10 +89,10 @@ class Job(): | |||
89 | self.inversion_start = None | 89 | self.inversion_start = None |
90 | self.inversion_end = None | 90 | self.inversion_end = None |
91 | def __str__(self): | 91 | def __str__(self): |
92 | return "({}.{}:{})".format(self.pid,self.job,self.deadline) | 92 | return "(%d.%d:%d)" % (self.pid,self.job,self.deadline) |
93 | 93 | ||
94 | # G-EDF errors: the start or end of an inversion | 94 | # G-EDF errors: the start or end of an inversion |
95 | class Error(): | 95 | class Error(object): |
96 | def __init__(self, job, eligible, on_cpu): | 96 | def __init__(self, job, eligible, on_cpu): |
97 | self.job = copy.copy(job) | 97 | self.job = copy.copy(job) |
98 | self.eligible = copy.copy(eligible) | 98 | self.eligible = copy.copy(eligible) |