-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbenchmark.html
156 lines (138 loc) · 3.22 KB
/
benchmark.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
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
149
150
151
152
153
154
155
156
<html>
<head>
<title>Nginx benchmark</title>
<style>
body {
margin: 0;
font-family: "Helvetica";
}
#navbar {
background: #4baf50;
color: #FFF;
width: 100%;
height: 60px;
}
#navbar h1 {
margin: 0;
padding: 10;
}
#forms {
margin: 15;
}
#footer {
background: #4baf50;
color: #FFF;
width: 100%;
height: 40px;
}
#footer p {
margin: 0;
padding: 10;
}
#footer a {
color: #FFF;
}
input[type="submit"] {
color: #fff;
background-color: #28a745;
border-color: #28a745;
border-radius: 4px;
}
hr {
color: #4BAF50;
}
fieldset label {
font-weight: bold;
}
</style>
</head>
<body>
<div id="navbar">
<h1>Nginx benchmark</h1>
</div>
<div id="forms">
<p>Nginx benchmark display a set of endpoint helping you to test your reverse-proxy</p>
<p>The endpoint aren't analysis tool in themselves but must be combined with the HTTP client of your choice.</p>
<hr>
<h2>/download</h2>
<div>
<p><i>Generate a file and download it</i></p>
</div>
<div>
<form action="/download">
<fieldset>
<legend>Try it</legend>
<label for="size">Size:</label>
<input type="number" id="size" name="size" value="20480">
<br>
<i>Total size of the file</i>
<br><br>
<label for="chunk_size">Chunk size:</label>
<input type="number" id="chunk_size" name="chunk_size" value="2048">
<br>
<i>Size of each chunk in the download stream</i>
<br><br>
<input type="submit">
</fieldset>
</form>
<pre>curl http://${host}/download?size=20480&chunk_size=2048</pre>
</div>
<hr>
<div>
<h2>/urandom</h2>
<p><i>Generate a file from /dev/urandom, just to stress CPU.</i></p>
<form action="/urandom">
<fieldset>
<legend>Try it</legend>
<label for="size">Size:</label>
<input type="number" name="size" value="2048">
<br><br>
<input type="submit">
</fieldset>
</form>
<pre>curl http://${host}/urandom?size=2048</pre>
</div>
<hr>
<div>
<h2>/zero</h2>
<p><i>Generate a file from /dev/zero with a lower stress than urandom</i></p>
<form action="/zero">
<fieldset>
<label for="size">Size:</label>
<input type="number" name="size" value="2048">
<br><br>
<input type="submit">
</fieldset>
</form>
<pre>curl http://${host}/zero?size=1</pre>
</div>
<hr>
<div>
<h2>/sleep</h2>
<p><i>Just wait x seconds</i></p>
<form action="/sleep">
<fieldset>
<label for="time">Seconds:</label>
<input type="number" name="time" value="1">
<br><br>
<input type="submit">
</fieldset>
</form>
<pre>curl http://${host}/sleep?time=1</pre>
</div>
<!--
<hr>
<h2>upload</h2>
<form action="/upload">
<label for="file">File:</label>
<input type="file" name="file">
<br>
<input type="submit">
</form>
-->
</div>
<div id="footer">
<p>Made with ❤️ by <a href="https://cloud-mercato.com">Cloud Mercato</a></p>
</div>
</body>
</html>