62 lines
2.4 KiB
HTML
62 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Test</title>
|
|
<link rel="stylesheet" href="/assets/style/bootstrap.css" crossorigin="anonymous">
|
|
<script src="/assets/nats.ws-1.30.3/test.js"></script>
|
|
<script type="module" src="/assets/nats.ws-1.30.3/examples/bench.js"></script>
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
<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> |