diff options
author | Ry Dahl <ry@tinyclouds.org> | 2020-01-20 09:49:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-20 09:49:18 -0500 |
commit | e83658138bff3605bd37c2b4ae4703081d884729 (patch) | |
tree | 323258ba0d66175bc55950e0e8c79d814f81c6c6 /tools/benchmark_test.py | |
parent | 7f80f9db3f4c3b064b230adfec7ff958fc195da6 (diff) |
Fix bug in strace parser (#3720)
Co-authored-by: @kt3k
Diffstat (limited to 'tools/benchmark_test.py')
-rwxr-xr-x | tools/benchmark_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/benchmark_test.py b/tools/benchmark_test.py index d0140c52c..2c1f384da 100755 --- a/tools/benchmark_test.py +++ b/tools/benchmark_test.py @@ -24,6 +24,17 @@ class TestBenchmark(DenoTestCase): # summary line assert summary["total"]["calls"] == 704 + def test_strace_parse2(self): + with open( + os.path.join(sys.path[0], "testdata/strace_summary2.out"), + "r") as f: + summary = benchmark.strace_parse(f.read()) + # first syscall line + assert summary["futex"]["calls"] == 449 + assert summary["futex"]["errors"] == 94 + # summary line + assert summary["total"]["calls"] == 821 + def test_max_mem_parse(self): with open(os.path.join(sys.path[0], "testdata/time.out"), "r") as f: data = f.read() |