summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/memcg-kernbench.load2
-rw-r--r--examples/sparsecat.load2
-rwxr-xr-xruntest20
3 files changed, 12 insertions, 12 deletions
diff --git a/examples/memcg-kernbench.load b/examples/memcg-kernbench.load
index abff87e..51feece 100644
--- a/examples/memcg-kernbench.load
+++ b/examples/memcg-kernbench.load
@@ -21,5 +21,5 @@ do
done
wait
-%data memory.stat
+%monitor memory.stat
cat %{M}/kernbench/memory.stat
diff --git a/examples/sparsecat.load b/examples/sparsecat.load
index 76a8d00..e025171 100644
--- a/examples/sparsecat.load
+++ b/examples/sparsecat.load
@@ -9,5 +9,5 @@ cat sparse >/dev/null
%cleanup
rm -f sparse
-%data vmstat
+%monitor vmstat
cat /proc/vmstat
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: