-
Notifications
You must be signed in to change notification settings - Fork 5
Description
express.js
`const express = require('express');
const app = express()
const http = require('mitol');
app.get('/', (req, res) => {
res.send('Hello World!');
});
http.createServer(app).listen(3000, () => {
console.log('Example app listening on port 3000!');
});`
kao.js
`const mitol = require('mitol');
const Koa = require('koa');
const app = new Koa();
// response
app.use(ctx => {
ctx.status = 200;
ctx.body = 'Hello World!';
});
mitol.createServer(app.callback()).listen(3000);`
wrk -t12 -c400 -d3s http://127.0.0.1:3000/
Running 3s test @ http://127.0.0.1:3000/
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.00us 0.00us 0.00us -nan%
Req/Sec 0.00 0.00 0.00 -nan%
0 requests in 3.10s, 0.00B read
Socket errors: connect 0, read 15897, write 0, timeout 0
Requests/sec: 0.00
Transfer/sec: 0.00B