summaryrefslogtreecommitdiff
path: root/tools/benchmark_test.py
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2018-09-25 20:08:09 -0400
committerBert Belder <bertbelder@gmail.com>2018-09-26 14:16:22 -0700
commit32806b18719f09ec3c1f5b41f3a8f98321328884 (patch)
tree0529cfa9663e8a47f3f99b831d2e8f6007912061 /tools/benchmark_test.py
parentdf09fbad92c4d48e58ed34000000f01ec4812e48 (diff)
Expand binary size benchmark (#830)
Diffstat (limited to 'tools/benchmark_test.py')
-rw-r--r--tools/benchmark_test.py11
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)