diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-12-11 21:44:39 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-12-11 22:19:14 +0100 |
| commit | 15ff4cfc2af131359fa047a3e5d28a4bee1c23c3 (patch) | |
| tree | 8677cfef6db80e57502c4004c0cbbb417532dab9 /src/benchmark.py | |
| parent | 13431ce7e8fdc1219d2bad27a3c05b148c836baf (diff) | |
| download | allocbench-15ff4cfc2af131359fa047a3e5d28a4bee1c23c3.tar.gz allocbench-15ff4cfc2af131359fa047a3e5d28a4bee1c23c3.zip | |
collect vmhwm for servers and use it for mysql, httpd and redis
Diffstat (limited to 'src/benchmark.py')
| -rw-r--r-- | src/benchmark.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/benchmark.py b/src/benchmark.py index b2ae16b..bbb6d50 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -471,13 +471,19 @@ class Benchmark: if l.startswith("VmHWM:"): result["VmHWM"] = l.split()[1] break + os.remove("status") - # TODO: get VmHWM from servers else: result["server_status"] = [] for server in self.servers: - with open("/proc/{}/status".format(server["popen"].pid), "r") as f: - result["server_status"].append(f.read()) + with open(f"/proc/{server['popen'].pid}/status", "r") as f: + server_status = f.read() + result["server_status"].append(server_status) + + for l in server_status.splitlines(): + if l.startswith("VmHWM:"): + result[f"{server.get('name', 'Server')}_vmhwm"] = l.split()[1] + break # parse perf output if available if self.measure_cmd == self.defaults["measure_cmd"] or self.measure_cmd_csv: @@ -495,6 +501,7 @@ class Benchmark: self.process_output(result, res.stdout, res.stderr, alloc_name, perm) + # save a valid result so we can expand invalid ones if valid_result is not None: valid_result = result |
