-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbench.html
59 lines (50 loc) · 2.17 KB
/
bench.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
crossorigin="anonymous">
</head>
<body>
<script type="module" src="./bench.js"></script>
<div class="container">
<h1 id="title">WS NATS Browser Performance</h1>
<label for="server">NATS Websocket Server</label>
<input type="text" class="form-control" id="server" placeholder="server" autocomplete="off"
value="localhost:9222"><br/>
<label for="ws">Use ws:// (uncheck for wss://)</label>
<input type="checkbox" class="form-check-input" id="ws" value="true" checked><br/>
<label for="subject">Subject</label>
<input type="text" class="form-control" id="subject" placeholder="subject" autocomplete="off" value="foo"><br/>
<label for="count">Count</label>
<input type="number" class="form-control" id="count" placeholder="messages" autocomplete="off"
value="100000"><br/>
<label for="payload">Payload size</label>
<input type="number" class="form-control" id="payload" placeholder="payload size in bytes" autocomplete="off"
value="0"><br/>
<label for="callbacks">Use callbacks</label>
<input type="checkbox" class="form-check-input" id="callbacks" value="true" checked><br/>
<h3>Test</h3>
<div class="radio-inline">
<label><input class="form-check-input" type="radio" value="pubsub" checked id="pubsub"
name="test">Pub/Sub</label>
</div>
<div class="radio-inline">
<label><input class="form-check-input" type="radio" value="pub" id="pub" name="test">Publish</label>
</div>
<div class="radio-inline">
<label><input class="form-check-input" type="radio" value="sub" id="sub" name="test">Subscribe</label>
</div>
<div class="radio-inline">
<label><input class="form-check-input" type="radio" value="sub" id="reqrep" name="test">ReqReq</label>
</div>
<br/><br/>
<button id="send" onclick="benchapp.run()" class="btn btn-primary">Start</button>
</div>
<br/>
<div class="container">
<pre id="results"></pre>
</div>
</body>
</html>