Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
deno
提交
1956d684
D
deno
项目概览
张重言
/
deno
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
deno
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1956d684
编写于
9月 25, 2018
作者:
R
Ryan Dahl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Also plot cold start time.
上级
3c24b9f7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
40 addition
and
11 deletion
+40
-11
tools/benchmark.py
tools/benchmark.py
+6
-3
website/app.js
website/app.js
+6
-1
website/app_test.js
website/app_test.js
+24
-3
website/index.html
website/index.html
+4
-4
未找到文件。
tools/benchmark.py
浏览文件 @
1956d684
...
...
@@ -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"
...
...
website/app.js
浏览文件 @
1956d684
...
...
@@ -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
,
...
...
website/app_test.js
浏览文件 @
1956d684
...
...
@@ -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
()
{
...
...
website/index.html
浏览文件 @
1956d684
...
...
@@ -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>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录