diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-04-17 15:47:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 15:47:07 -0400 |
commit | f03280ead1bec16b2c0c33fb980e2db7f58a5933 (patch) | |
tree | 07f882272a64125e59b03de4d497fb7b4c680006 /tools/benchmark_test.py | |
parent | 1a69df4a051b9407ab341a82d65d4355f77ad16b (diff) |
benchmarks: improve syscall and thread count (#2140)
Diffstat (limited to 'tools/benchmark_test.py')
-rwxr-xr-x | tools/benchmark_test.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tools/benchmark_test.py b/tools/benchmark_test.py index bc3ce8a71..9905d7d0e 100755 --- a/tools/benchmark_test.py +++ b/tools/benchmark_test.py @@ -36,16 +36,19 @@ def binary_size_test(build_dir): assert binary_size_dict["snapshot_deno.bin"] > 0 -def thread_count_test(deno_path): - thread_count_dict = benchmark.run_thread_count_benchmark(deno_path) - assert "set_timeout" in thread_count_dict - assert thread_count_dict["set_timeout"] > 1 +def strace_test(deno_path): + new_data = {} + benchmark.run_strace_benchmarks(deno_path, new_data) + assert "thread_count" in new_data + assert "syscall_count" in new_data + s = new_data["thread_count"] + assert "hello" in s + assert s["hello"] > 1 -def syscall_count_test(deno_path): - syscall_count_dict = benchmark.run_syscall_count_benchmark(deno_path) - assert "hello" in syscall_count_dict - assert syscall_count_dict["hello"] > 1 + s = new_data["syscall_count"] + assert "hello" in s + assert s["hello"] > 1 def benchmark_test(build_dir, deno_path): @@ -53,8 +56,7 @@ def benchmark_test(build_dir, deno_path): binary_size_test(build_dir) max_mem_parse_test() if "linux" in sys.platform: - thread_count_test(deno_path) - syscall_count_test(deno_path) + strace_test(deno_path) # This test assumes tools/http_server.py is running in the background. |