@@ -139,3 +139,56 @@ Results
139
139
To respond to HTTP requests, the user's define callback will be used.
140
140
HTTPS is responded by ` Fastify ` .
141
141
`
142
+
143
+ ## Test coverage
144
+
145
+ This extension has 100% coverage, both in TypeScrypt and JavaScript
146
+
147
+ ## Benchmark
148
+
149
+ _ You can try it yourself using ` npm run benchmark ` _
150
+
151
+ ### Classic, Fastify without extension, but HTTPS only
152
+ ```
153
+ Running 5s test @ https://localhost:3000/
154
+ 100 connections with 10 pipelining factor
155
+
156
+ ┌─────────┬──────┬──────┬───────┬───────┬─────────┬─────────┬──────────┐
157
+ │ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
158
+ ├─────────┼──────┼──────┼───────┼───────┼─────────┼─────────┼──────────┤
159
+ │ Latency │ 0 ms │ 0 ms │ 29 ms │ 35 ms │ 4.14 ms │ 26.5 ms │ 974.2 ms │
160
+ └─────────┴──────┴──────┴───────┴───────┴─────────┴─────────┴──────────┘
161
+ ┌───────────┬────────┬────────┬─────────┬────────┬─────────┬──────────┬────────┐
162
+ │ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
163
+ ├───────────┼────────┼────────┼─────────┼────────┼─────────┼──────────┼────────┤
164
+ │ Req/Sec │ 1559 │ 1559 │ 29423 │ 31695 │ 23767.8 │ 11409.48 │ 1559 │
165
+ ├───────────┼────────┼────────┼─────────┼────────┼─────────┼──────────┼────────┤
166
+ │ Bytes/Sec │ 256 kB │ 256 kB │ 4.83 MB │ 5.2 MB │ 3.9 MB │ 1.87 MB │ 256 kB │
167
+ └───────────┴────────┴────────┴─────────┴────────┴─────────┴──────────┴────────┘
168
+
169
+ Req/Bytes counts sampled once per second.
170
+
171
+ 119k requests in 5.13s, 19.5 MB read
172
+ ```
173
+ ### With extension enabled, but with HTTPS only
174
+ ```
175
+ Running 5s test @ https://localhost:3000/
176
+ 100 connections with 10 pipelining factor
177
+
178
+ ┌─────────┬──────┬──────┬───────┬───────┬─────────┬──────────┬───────────┐
179
+ │ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
180
+ ├─────────┼──────┼──────┼───────┼───────┼─────────┼──────────┼───────────┤
181
+ │ Latency │ 0 ms │ 0 ms │ 30 ms │ 37 ms │ 4.26 ms │ 27.62 ms │ 987.77 ms │
182
+ └─────────┴──────┴──────┴───────┴───────┴─────────┴──────────┴───────────┘
183
+ ┌───────────┬────────┬────────┬─────────┬─────────┬─────────┬──────────┬────────┐
184
+ │ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
185
+ ├───────────┼────────┼────────┼─────────┼─────────┼─────────┼──────────┼────────┤
186
+ │ Req/Sec │ 1351 │ 1351 │ 28415 │ 30575 │ 23140.6 │ 11063.46 │ 1351 │
187
+ ├───────────┼────────┼────────┼─────────┼─────────┼─────────┼──────────┼────────┤
188
+ │ Bytes/Sec │ 222 kB │ 222 kB │ 4.66 MB │ 5.01 MB │ 3.79 MB │ 1.81 MB │ 222 kB │
189
+ └───────────┴────────┴────────┴─────────┴─────────┴─────────┴──────────┴────────┘
190
+
191
+ Req/Bytes counts sampled once per second.
192
+
193
+ 116k requests in 5.15s, 19 MB read
194
+ ```
0 commit comments