diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2012-01-10 14:59:02 +0100 |
---|---|---|
committer | Johannes Weiner <hannes@cmpxchg.org> | 2012-01-10 15:22:56 +0100 |
commit | 96ede7370f9108555c95e3ab2b0d43864bca9f36 (patch) | |
tree | d4207584fd92e50cbebb738f81db4f939fcc1523 | |
parent | 37cb85fdc1bbd07dc707ec14d38caaf4d972cbf6 (diff) |
runtest: rename %data to %monitor
This is a bit more descriptive and also removes some of the ambiguity
when the upcoming analyze tool also uses %data for data sources.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
-rw-r--r-- | examples/memcg-kernbench.load | 2 | ||||
-rw-r--r-- | examples/sparsecat.load | 2 | ||||
-rwxr-xr-x | runtest | 20 |
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 @@ -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: |