mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Also plot cold start time.
This commit is contained in:
parent
3c24b9f724
commit
1956d6846c
4 changed files with 40 additions and 11 deletions
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue