diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2018-09-25 20:08:09 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-25 20:08:09 -0400 |
commit | 8c7416b3f666c62327a2306e955ec59823b1f239 (patch) | |
tree | 2ebec1fc73f85c22c73eb150d2153077538c663c /tools/benchmark_test.py | |
parent | 591174a686bc35c86b2100d660c7f066598a8829 (diff) |
Expand binary size benchmark (#830)
Diffstat (limited to 'tools/benchmark_test.py')
-rw-r--r-- | tools/benchmark_test.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/benchmark_test.py b/tools/benchmark_test.py index cdaad1e1f..42a3465b2 100644 --- a/tools/benchmark_test.py +++ b/tools/benchmark_test.py @@ -19,6 +19,14 @@ def strace_parse_test(): assert summary["total"]["calls"] == 704 +def binary_size_test(build_dir): + binary_size_dict = benchmark.get_binary_sizes(build_dir) + assert binary_size_dict["deno"] > 0 + assert binary_size_dict["main.js"] > 0 + assert binary_size_dict["main.js.map"] > 0 + 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 @@ -31,8 +39,9 @@ def syscall_count_test(deno_path): assert syscall_count_dict["hello"] > 1 -def benchmark_test(deno_path): +def benchmark_test(build_dir, deno_path): strace_parse_test() + binary_size_test(build_dir) if "linux" in sys.platform: thread_count_test(deno_path) syscall_count_test(deno_path) |