forked from websockets/ws
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfast.html
More file actions
110 lines (109 loc) · 3.34 KB
/
Copy pathfast.html
File metadata and controls
110 lines (109 loc) · 3.34 KB
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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>node.js is fast</title>
<style>
body {
font: 14px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 0;
color: #2C2C2C;
text-align: center;
}
#content {
width: 580px;
margin-top: 50px;
display: inline-block;
text-align: left;
}
#content p {
border-left: 4px solid #cfcfcf;
padding-left: 5px;
}
.head {
font-size: 14pt;
}
.container {
width: 800px;
height: 400px;
margin: 0 auto 30px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
<script type="text/javascript" src="js/modules/exporting.js"></script>
<script type="text/javascript">
$(document).ready(function() {
new Highcharts.Chart({
chart: {
renderTo: 'container1',
defaultSeriesType: 'column'
},
title: {
text: 'How long does it take to send, and receive, 10.000 * 64kB?'
},
subtitle: {
text: 'Lower is better'
},
xAxis: {
categories: ['em-websocket', 'WebSocket-Node', 'jetty', 'faye-websocket-node', 'ws']
},
yAxis: {
min: 0,
title: {
text: 'Seconds'
}
},
tooltip: {
enabled: true,
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
this.x +': '+ this.y +' sec';
}
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: true
}
},
series: [
{
name: 'Time Elapsed',
data: [521.3, 15.9, 13.6, 12.1, 8.3],
dataLabels: {
enabled: true,
formatter: function() {
return this.y;
}
}
}]
});
});
</script>
</head>
<body>
<a href="http://github.com/einaros/ws"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
<div id="content">
<div class="head">node.js is fast.</div>
<p>
this is a one-shot comparison of a few websocket server implementations:
</p>
<p>
<ul>
<li><b>em-websocket</b>: Running on Ruby v1.9.3
<li><b>faye-websocket-node</b>: Running on node.js v0.6.5
<li><b>WebSocket-Node</b>: Running on node.js v0.6.5
<li><b>jetty 7.5.5-SNAPSHOT</b>: Running on Java 1.6.0_24, OpenJDK 20.0-b12
<li><b>ws</b>: Written by yours truly. Running on node.js v0.6.5
</ul>
</p>
<p>
the test is simple. start a websocket server, which echos everything it receives; then start a client which sends 10.000 messages, each 64kB long. when the client receives the server's echo: loop. how long does it take to roundtrip all 10.000 messages?
</p>
</div>
<div id="container1" class="container"></div>
</body>
</html>