Fix benchmark script
This commit is contained in:
parent
5357ce9347
commit
4e5e072c1b
|
@ -201,12 +201,12 @@ function runBenchmark (options: {
|
||||||
headers?: { [ id: string ]: string }
|
headers?: { [ id: string ]: string }
|
||||||
expecter: Function
|
expecter: Function
|
||||||
}) {
|
}) {
|
||||||
const { method, path, body, expecter, headers } = options
|
const { method = 'GET', path, body, expecter, headers } = options
|
||||||
|
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
autocannon({
|
autocannon({
|
||||||
url: server.url + path,
|
url: server.url + path,
|
||||||
method,
|
method: method,
|
||||||
body,
|
body,
|
||||||
connections: 20,
|
connections: 20,
|
||||||
headers,
|
headers,
|
||||||
|
|
Loading…
Reference in New Issue