summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-09-25 04:28:56 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-09-25 13:13:09 -0400
commit1956d6846c0ef716455f3cf6b1d5caa6cee09a08 (patch)
tree34f8f499e82b7eb02cd23c9ebc6950c3fabc0b53
parent3c24b9f724287d2ca722e61a395ad9c93b7551c6 (diff)
Also plot cold start time.
-rwxr-xr-xtools/benchmark.py9
-rw-r--r--website/app.js7
-rw-r--r--website/app_test.js27
-rw-r--r--website/index.html8
4 files changed, 40 insertions, 11 deletions
diff --git a/tools/benchmark.py b/tools/benchmark.py
index b3a6fd363..fd33863c9 100755
--- a/tools/benchmark.py
+++ b/tools/benchmark.py
@@ -20,9 +20,12 @@ except:
"Warning: another http_server instance is running"
# The list of the tuples of the benchmark name and arguments
-exec_time_benchmarks = [("hello", ["tests/002_hello.ts", "--reload"]),
- ("relative_import",
- ["tests/003_relative_import.ts", "--reload"])]
+exec_time_benchmarks = [
+ ("hello", ["tests/002_hello.ts"]),
+ ("relative_import", ["tests/003_relative_import.ts"]),
+ ("cold_hello", ["tests/002_hello.ts", "--recompile"]),
+ ("cold_relative_import", ["tests/003_relative_import.ts", "--recompile"]),
+]
gh_pages_data_file = "gh-pages/data.json"
data_file = "website/data.json"
diff --git a/website/app.js b/website/app.js
index ba8dbac36..ab9dbb8a4 100644
--- a/website/app.js
+++ b/website/app.js
@@ -4,7 +4,12 @@ export async function getJson(path) {
return (await fetch(path)).json();
}
-const benchmarkNames = ["hello", "relative_import"];
+const benchmarkNames = [
+ "hello",
+ "relative_import",
+ "cold_hello",
+ "cold_relative_import"
+];
export function createExecTimeColumns(data) {
return benchmarkNames.map(name => [
name,
diff --git a/website/app_test.js b/website/app_test.js
index 48b7f2859..1468fce22 100644
--- a/website/app_test.js
+++ b/website/app_test.js
@@ -21,6 +21,12 @@ const regularData = [
},
relative_import: {
mean: 0.06
+ },
+ cold_hello: {
+ mean: 0.05
+ },
+ cold_relative_import: {
+ mean: 0.06
}
},
thread_count: {
@@ -41,6 +47,12 @@ const regularData = [
},
relative_import: {
mean: 0.065
+ },
+ cold_hello: {
+ mean: 0.055
+ },
+ cold_relative_import: {
+ mean: 0.065
}
},
thread_count: {
@@ -59,7 +71,9 @@ const irregularData = [
sha1: "123",
benchmark: {
hello: {},
- relative_import: {}
+ relative_import: {},
+ cold_hello: {},
+ cold_relative_import: {}
},
thread_count: {},
syscall_count: {}
@@ -75,13 +89,20 @@ test(function createExecTimeColumnsRegularData() {
const columns = createExecTimeColumns(regularData);
assertEqual(columns, [
["hello", 0.05, 0.055],
- ["relative_import", 0.06, 0.065]
+ ["relative_import", 0.06, 0.065],
+ ["cold_hello", 0.05, 0.055],
+ ["cold_relative_import", 0.06, 0.065]
]);
});
test(function createExecTimeColumnsIrregularData() {
const columns = createExecTimeColumns(irregularData);
- assertEqual(columns, [["hello", 0, 0], ["relative_import", 0, 0]]);
+ assertEqual(columns, [
+ ["hello", 0, 0],
+ ["relative_import", 0, 0],
+ ["cold_hello", 0, 0],
+ ["cold_relative_import", 0, 0]
+ ]);
});
test(function createBinarySizeColumnsRegularData() {
diff --git a/website/index.html b/website/index.html
index 3871763ac..52cfdc442 100644
--- a/website/index.html
+++ b/website/index.html
@@ -5,13 +5,13 @@
<link rel="stylesheet" href="https://unpkg.com/c3@0.6.7/c3.min.css">
</head>
<body>
- <h2>Execution time chart</h2>
+ <h2>Execution time</h2>
<div id="exec-time-chart"></div>
- <h2>Binary size chart</h2>
+ <h2>Binary size</h2>
<div id="binary-size-chart"></div>
- <h2>Thread count chart</h2>
+ <h2>Thread count</h2>
<div id="thread-count-chart"></div>
- <h2>Syscall count chart</h2>
+ <h2>Syscall count</h2>
<div id="syscall-count-chart"></div>
<script src="https://unpkg.com/d3@5.7.0/dist/d3.min.js"></script>
<script src="https://unpkg.com/c3@0.6.7/c3.min.js"></script>