diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2018-08-24 22:15:32 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2018-08-24 22:15:32 +0200 |
| commit | 933592db4782b0fe155231f805e017330efd5f65 (patch) | |
| tree | 95f0a128a5c846db7a4c9b8a354133776d78f6b0 /loop.py | |
| parent | 423cc4f28dc7fbf86ee951a22b7c69cfe3d0131c (diff) | |
| download | allocbench-933592db4782b0fe155231f805e017330efd5f65.tar.gz allocbench-933592db4782b0fe155231f805e017330efd5f65.zip | |
use new memusage gathering in loop
Diffstat (limited to 'loop.py')
| -rw-r--r-- | loop.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -64,13 +64,16 @@ class Benchmark_Loop( Benchmark ): # Collect memory consumtion on first run if run == 1: - subprocess.run((cur_cmd + " yes loop.out").split(), env=os.environ) - with open("loop.out", "r") as f: + os.environ["LD_PRELOAD"] = "build/print_status_on_exit.so " + os.environ["LD_PRELOAD"] + subprocess.run(cur_cmd.split(), env=os.environ) + with open("status", "r") as f: for l in f.readlines(): if l.startswith("VmHWM:"): result["rssmax"] = l.split()[1] - target_cmd = perf_cmd + cur_cmd + " no" + os.environ["LD_PRELOAD"] = t["LD_PRELOAD"] + + target_cmd = perf_cmd + cur_cmd if verbose: print("\n" + tname, t, "\n", target_cmd, "\n") @@ -84,7 +87,7 @@ class Benchmark_Loop( Benchmark ): output = p.stderr if p.returncode != 0: - print("\n" + " ".join(target_cmd), "exited with", p.returncode, ".\n Aborting Benchmark.") + print("\n" + target_cmd, "exited with", p.returncode, ".\n Aborting Benchmark.") print(tname, t) print(output) print(p.stdout) |
