blob: 922052bc71029fe88fb6afa32f844b8537915294 (
plain)
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
|
<!-- Copyright 2018 the Deno authors. All rights reserved. MIT license. -->
<!DOCTYPE html>
<html>
<head>
<title>Deno</title>
<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, maximum-scale=1.0, user-scalable=0' name='viewport' />
</head>
<body>
<main>
<img src="deno_logo.png" width=150 />
<h1>Deno</h1>
<table>
<tr>
<th>Linux & Mac</th>
<th>Windows</th>
</tr>
<tr>
<td>
<a href="https://travis-ci.com/denoland/deno"><img src="https://travis-ci.com/denoland/deno.svg?branch=master"/></a>
</td>
<td>
<a href="https://ci.appveyor.com/project/deno/deno"><img src="https://ci.appveyor.com/api/projects/status/yel7wtcqwoy0to8x/branch/master?svg=true"/></a>
</td>
</tr>
</table>
<p>Deno is a secure JavaScript / TypeScript runtime built on V8
<p> <a href="https://github.com/denoland/deno">github.com/denoland/deno</a>
<p><a href="https://github.com/denoland/deno_std">github.com/denoland/deno_std</a>
<p><a href="https://github.com/denoland/deno_install">github.com/denoland/deno_install</a>
<p><a href="https://github.com/denoland/registry">github.com/denoland/registry</a>
<p> <a href="https://github.com/denoland/deno/blob/master/Docs.md">Documentation</a>
<p> <a href="typedoc/index.html">API Reference</a>
<p><a href="https://github.com/denolib/awesome-deno">Links to other Deno resources.</a>
<h2>Getting started</h2>
<p>Install Deno into ~/.deno/bin
<pre>
curl -L https://deno.land/x/install/install.py | python
export PATH=$HOME/.deno/bin:$PATH
</pre>
Try a Deno program. Install by bash alias.
This one serves a local directory in HTTP.
<pre>
alias file_server="deno \
https://deno.land/x/http/file_server.ts --allow-net"
</pre>
Run it:
<pre>
% file_server .
Downloading https://deno.land/x/http/file_server.ts...
[...]
HTTP server listening on http://0.0.0.0:4500/
</pre>
And if you ever want to upgrade to the latest published version:
<pre>
file_server --reload
</pre>
<h2>Benchmarks</h2>
<h3>Execution time</h3>
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>
and
<a href="https://github.com/denoland/deno/blob/master/tests/003_relative_import.ts">tests/003_relative_import.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.
<div id="exec-time-chart"></div>
<h3>Throughput</h3>
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.
<div id="throughput-chart"></div>
<h3>Req/Sec</h3>
Tests HTTP server performance. 10 keep-alive connections
do as many hello-world requests as possible. Bigger is better.
<ul>
<!-- TODO rename "deno" to "deno_tcp". -->
<li><a
href="https://github.com/denoland/deno/blob/master/tests/http_bench.ts">deno</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><a
href="https://github.com/denoland/deno_std/blob/master/http/http_bench.ts">deno_net_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><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.
</ul>
<div id="req-per-sec-chart"></div>
<h3>Executable size</h3>
deno ships only a single binary. We track its size here.
<div id="binary-size-chart"></div>
<h3>Thread count</h3>
How many threads various programs use.
<div id="thread-count-chart"></div>
<h3>Syscall count</h3>
How many total syscalls are performed when executing a given script.
<div id="syscall-count-chart"></div>
<h3>Travis</h3>
How long for Travis CI to return a green status for pull requests.
<div id="travis-compile-time-chart"></div>
<h3>References</h3>
<p> <a href="./all_benchmark.html">All benchmark data</a>
</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";
drawCharts("recent.json");
</script>
</body>
</html>
|