diff --git a/samples/static/benchmark.js b/samples/static/benchmark.js index e3be39f6..ba152e16 100644 --- a/samples/static/benchmark.js +++ b/samples/static/benchmark.js @@ -4,11 +4,16 @@ const autocannon = require('autocannon') const ports = require('./ports.js') async function test (name, url) { - for (const portName of Object.keys(ports)) { - const port = ports[portName] - const impl = /^(.*)_PORT/.exec(portName)[1].toLocaleLowerCase() - for (let measure = 0; measure < 3; ++measure) { - const result = await autocannon({ url: `http://localhost:${port}${url}` }) + for (let measure = 0; measure < 10; ++measure) { + for (const portName of Object.keys(ports)) { + const port = ports[portName] + const impl = /^(.*)_PORT/.exec(portName)[1].toLocaleLowerCase() + const result = await autocannon({ + url: `http://localhost:${port}${url}`, + connections: 10, //default + pipelining: 1, // default + duration: 10 // default + }) if (result.non2xx !== 0) { throw new Error(`Non 2xx results on ${name} for ${impl}`) }