/
main.html
117 lines (117 loc) · 5.47 KB
/
main.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
<!DOCTYPE html>
<html>
<head><title>Φορτίο v{{.Version}}</title>
<script src="{{.ChartJSPath}}"></script>
<script src="{{.Version}}/static/js/fortio_chart.js"></script>
<link rel="icon" href="{{.Version}}/static/img/favicon.ico"/>
<link rel="stylesheet" href="{{.Version}}/static/css/fortio.css">
</head>
{{template "header" .}}
<h1>Φορτίο (fortio) v{{.Version}}{{if not .DoLoad}} control UI{{end}}</h1>
<p>Up for {{.UpTime}} (since {{.StartTime}}).
{{if .DoLoad}}
<p>{{.Labels}} {{.TargetURL}}
<div id="running">
Running load test... Results pending...
<br />
<progress id="progressBar" max="100" value="0" style="width: 100%"></progress>
<br />
<button type="submit" onclick='javascript:fetch("./?stop=Stop&runid={{.RunID}}");'>Interrupt</button>
</div>
<script>runTestForDuration({{.TestExpectedDurationSeconds}})</script>
<div class="chart-container" id="cc1" style="position: relative; height:75vh; width:95vw; display:none;">
<canvas id="chart1"></canvas>
</div>
<div id="update" style="visibility: hidden">
<form id="updtForm" action="javascript:updateChart()">
<input type="submit" value="Update:" />
Time axis min <input type="text" name="xmin" size="5" /> ms,
max <input type="text" name="xmax" size="5" /> ms,
logarithmic:<input name="xlog" type="checkbox" onclick="updateChart()" />.
Count axis min <input type="text" name="ymin" size="5" /> ms,
max <input type="text" name="ymax" size="5" /> ms,
logarithmic: <input name="ylog" type="checkbox" onclick="updateChart()" />
</form>
</div>
<pre>{{else}}
{{if .DoStop}}
<p>Stoping runs as per request.</p>
{{else}}
<form id="run-form" method="GET" onsubmit="checkPayload()">
<div>
Title/Labels: <input type="text" name="labels" size="40" value="Fortio" /> (empty to skip title)<br />
URL: <input type="text" name="url" size="80" value="http://{{.URLHostPort}}/echo?delay=250us:30,5ms:5&status=503:0.5,429:1.5" /> <br />
QPS: <input type="text" name="qps" size="6" value="1000" />
Duration: <input id="duration" type="text" name="t" size="6" value="3s" />
or run until interrupted:<input type="checkbox" name="t" onchange="toggleDuration(this)" />
or run for exactly <input type="text" name="n" size="6" value="" /> calls. <br />
Threads/Simultaneous connections: <input type="text" name="c" size="6" value="8" /> <br />
Connection reuse range: Min <input type="text" name="connection-reuse-range-min" size="6" value="" />
Max <input type="text" name="connection-reuse-range-max" size="6" value="" />
or Single value: <input type="text" name="connection-reuse-range-value" size="6" value="" /> <br />
Uniform:<input type="checkbox" name="uniform" /> or Jitter:<input type="checkbox" name="jitter" />
No Catch-Up (qps is a ceiling): <input type="checkbox" name="nocatchup" /><br />
Percentiles: <input type="text" name="p" size="20" value="50, 75, 90, 99, 99.9" /> <br />
Histogram Resolution: <input type="text" name="r" size="8" value="0.0001" /> <br />
Extra Headers:<br />
<input type="text" name="H" size=40 value="" /> <br />
<button type="button" onclick="addCustomHeader()">+</button>
<br />
Payload:<br /><textarea name="payload" rows="5" cols="75" id="payload"></textarea><br />
Load using:<br />
tcp/udp/http: <input type="radio" name="runner" value="http" checked/>
(https insecure:<input type="checkbox" name="https-insecure" />,
standard go client instead of fastclient:<input type="checkbox" name="stdclient"/>,
sequential warmup: <input type="checkbox" name="sequential-warmup"/>,
resolve: <input type="text" name="resolve" size="12" value="" />)
<br /> or<br />
grpc: <input type="radio" name="runner" value="grpc"/>
(grpc secure transport (tls):<input type="checkbox" name="grpc-secure" />,
using ping backend:<input type="checkbox" name="ping" />,
ping delay: <input type="text" name="grpc-ping-delay" size="6" value="0" />) <br />
JSON output:<input type="checkbox" name="json" />,
Save output:<input type="checkbox" name="save" checked />) <br />
Timeout: <input type="text" name="timeout" size="12" value="750ms" /> <br />
<input type="submit" name="load" value="Start"/>
</div>
</form>
<p><i>Or</i></p>
<div>
Browse <a href='browse'>saved results</a> (or <a href="data/">raw JSON</a>)
</div>
<p><i>Or</i></p>
<form action="fetch2/">
<div>
Debug fetch any single URL: <input type="text" id="url" name="url" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<form action="javascript:document.location += 'fetch/' + document.getElementById('uri').value">
<div>
HTTP/1.1 only semi proxy
Debug fetch http://<input type="text" id="uri" name="uri" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<a href="{{.DebugPath}}">debug</a> and <a href="{{.DebugPath}}?env=dump">debug with env dump</a>
and <a href="/debug/pprof/">Internal PPROF</a>
and <a href="flags">Command line flags</a>
and <a href="{{.EchoDebugPath}}">Additional echo handler under {{.EchoDebugPath}}</a> (supports all the
query arguments mentioned on the <a href="https://github.com/fortio/fortio#server-urls-and-features">Echo url features</a> github doc)
<p><i>Or</i></p>
<form action="sync">
<div>
Sync/download tsv or xml s3 bucket data from:<br />
<input type="text" name="url" value="" size=50/>
</div>
</form>
<p><i>Or</i></p>
<form method="POST">
<div>
Interrupt runs from this server: <input type="submit" name="stop" value="Stop" />
</div>
</form>
{{end}}
</body>
</html>
{{end}}