forked from denoland/deno
/
benchmarks.html
192 lines (161 loc) · 6.33 KB
/
benchmarks.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!-- Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -->
<!DOCTYPE html>
<html>
<head>
<title>Deno Benchmarks</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="https://unpkg.com/c3@0.6.7/c3.min.css" />
<link rel="stylesheet" href="style.css" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
</head>
<body>
<div id="spinner-overlay">
<div class="spinner"></div>`
</div>
<main>
<a href="/"><img src="images/deno_logo_4.gif" width=200></a>
<h1>Deno Continuous Benchmarks</h1>
<p>
These plots are updated on every commit to
<a href="https://github.com/denoland/deno">master branch</a>.
</p>
<p>Make sure your adblocker is disabled as some can block the chart rendering.</p>
<p><a href="#recent">recent data</a></p>
<p><a href="#all">all data</a> (takes a moment to load)</p>
<h3 id="req-per-sec">Req/Sec <a href="#req-per-sec">#</a></h3>
<p>
Tests HTTP server performance. 10 keep-alive connections do as many
hello-world requests as possible. Bigger is better.
</p>
<ul>
<li>
<a
href="https://github.com/denoland/deno/blob/master/tools/deno_tcp.ts"
>deno_tcp</a>
is a fake http server that doesn't parse HTTP. It is comparable to
<a
href="https://github.com/denoland/deno/blob/master/tools/node_tcp.js"
>node_tcp</a>
.
</li>
<li>
<a
href="https://github.com/denoland/deno_std/blob/master/http/http_bench.ts"
>deno_http</a>
is a web server written in TypeScript. It is comparable to
<a
href="https://github.com/denoland/deno/blob/master/tools/node_http.js"
>node_http</a>
.
</li>
<li>deno_core_single and deno_core_multi are two versions of
a minimal fake HTTP server. It blindly reads and writes fixed HTTP
packets. It is comparable to deno_tcp and node_tcp.
This is a standalone executable that uses <a
href="https://crates.io/crates/deno">the deno rust crate</a>. The
code is in
<a
href="https://github.com/denoland/deno/blob/master/core/examples/http_bench.rs"
>http_bench.rs</a>
and
<a
href="https://github.com/denoland/deno/blob/master/core/examples/http_bench.js"
>http_bench.js</a>. single uses <a
href="https://docs.rs/tokio/0.1.19/tokio/runtime/current_thread/index.html">tokio::runtime::current_thread</a>
and multi uses <a
href="https://docs.rs/tokio/0.1.19/tokio/runtime/">tokio::runtime::threadpool</a>.
</li>
<li>
<a
href="https://github.com/denoland/deno/blob/master/tools/hyper_hello.rs"
>
hyper
</a>
is a Rust HTTP server and represents an upper bound.
</li>
</ul>
<div id="req-per-sec-chart"></div>
<h3 id="max-latency">Max Latency <a href="#max-latency">#</a></h3>
<p>
Max latency during the same test used above for requests/second. Smaller is better.
</p>
<div id="max-latency-chart"></div>
<h3 id="exec-time">Execution time <a href="#exec-time">#</a></h3>
<p>
This shows how much time total it takes to run a few simple deno
programs:
<a
href="https://github.com/denoland/deno/blob/master/tests/002_hello.ts"
>
tests/002_hello.ts
</a>,
<a
href="https://github.com/denoland/deno/blob/master/tests/003_relative_import.ts"
>tests/003_relative_import.ts</a
>,
<a
href="https://github.com/denoland/deno/blob/master/tests/workers_round_robin_bench.ts"
>tests/workers_round_robin_bench.ts</a
>, and
<a
href="https://github.com/denoland/deno/blob/master/tests/workers_startup_bench.ts"
>tests/workers_startup_bench.ts</a
>. For deno to execute typescript, it must first compile it to JS. A
warm startup is when deno has a cached JS output already, so it should
be fast because it bypasses the TS compiler. A cold startup is when deno
must compile from scratch.
</p>
<div id="exec-time-chart"></div>
<h3 id="throughput">Throughput <a href="#throughput">#</a></h3>
<p>
Time it takes to pipe a certain amount of data through Deno.
<a
href="https://github.com/denoland/deno/blob/master/tests/echo_server.ts"
>
echo_server.ts
</a>
and
<a href="https://github.com/denoland/deno/blob/master/tests/cat.ts">
cat.ts </a
>. Smaller is better.
</p>
<div id="throughput-chart"></div>
<h3 id="max-memory">Max Memory Usage <a href="#max-memory">#</a></h3>
<p>
Max memory usage during execution. Smaller is better.
</p>
<div id="max-memory-chart"></div>
<h3 id="size">Executable size <a href="#size">#</a></h3>
<p>deno ships only a single binary. We track its size here.</p>
<div id="binary-size-chart"></div>
<h3 id="threads">Thread count <a href="#threads">#</a></h3>
<p>How many threads various programs use.</p>
<div id="thread-count-chart"></div>
<h3 id="syscalls">Syscall count <a href="#syscalls">#</a></h3>
<p>
How many total syscalls are performed when executing a given script.
</p>
<div id="syscall-count-chart"></div>
</main>
<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>
<script type="module">
import { drawCharts } from "./app.js";
window.chartWidth = 800;
const overlay = document.getElementById("spinner-overlay")
function showSpinner () {
overlay.style.display = "block";
}
function hideSpinner () {
overlay.style.display = "none";
}
function updateCharts () {
const u = window.location.hash.match("all") ? "./data.json" : "recent.json";
showSpinner()
drawCharts(u).finally(hideSpinner)
}
updateCharts()
window.onhashchange = updateCharts
</script>
</body>
</html>