summaryrefslogtreecommitdiff
path: root/tools/benchmark_test.py
diff options
context:
space:
mode:
authorRy Dahl <ry@tinyclouds.org>2020-01-20 09:49:18 -0500
committerGitHub <noreply@github.com>2020-01-20 09:49:18 -0500
commite83658138bff3605bd37c2b4ae4703081d884729 (patch)
tree323258ba0d66175bc55950e0e8c79d814f81c6c6 /tools/benchmark_test.py
parent7f80f9db3f4c3b064b230adfec7ff958fc195da6 (diff)
Fix bug in strace parser (#3720)
Co-authored-by: @kt3k
Diffstat (limited to 'tools/benchmark_test.py')
-rwxr-xr-xtools/benchmark_test.py11
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()