summaryrefslogtreecommitdiff
path: root/runtest
diff options
context:
space:
mode:
Diffstat (limited to 'runtest')
-rwxr-xr-xruntest20
1 files changed, 10 insertions, 10 deletions
diff --git a/runtest b/runtest
index d0f4cf7..33fd3d1 100755
--- a/runtest
+++ b/runtest
@@ -47,25 +47,25 @@ class Work(object):
def timestamp(self):
print(monotonic_time(), file=self.data)
-class Data(object):
+class Monitor(object):
def __init__(self, prefix, name, execute):
stem = '%s-%s' % (prefix, name)
- self.data = open(stem + '.data', 'a')
+ self.logfile = open(stem + '.data', 'a')
self.execute = execute
def __del__(self):
- print('', file=self.data)
- self.data.close()
+ print('', file=self.logfile)
+ self.logfile.close()
def collect(self):
subprocess.Popen(self.execute, shell=True,
- stdout=self.data)
+ stdout=self.logfile)
defs = {}
works = {}
-collectors = []
+monitors = []
def collect():
- for c in collectors:
- c.collect()
+ for m in monitors:
+ m.collect()
def sigalrm_handler(sig, frame):
collect()
@@ -77,8 +77,8 @@ parser.add_argument('name')
args = parser.parse_args()
def save_section(type_, name, body):
- if type_ == 'data':
- collectors.append(Data(args.name, name, body))
+ if type_ == 'monitor':
+ monitors.append(Monitor(args.name, name, body))
else:
work = works.get(name)
if not work: