diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-30 14:22:33 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-30 14:22:33 +0200 |
commit | 736c64ca4bbe6d53241f0a4f805dc81faea49969 (patch) | |
tree | 15fcb90c26798158a4277659ce6d51b6bc925cc1 /scripts | |
parent | 2b36e477bfc5f6b28fe7491ec9d2e6eb1337838b (diff) | |
download | PeerTube-736c64ca4bbe6d53241f0a4f805dc81faea49969.tar.gz PeerTube-736c64ca4bbe6d53241f0a4f805dc81faea49969.tar.zst PeerTube-736c64ca4bbe6d53241f0a4f805dc81faea49969.zip |
Fix benchmark script
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/benchmark.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/benchmark.ts b/scripts/benchmark.ts index 5dcf9b01b..c29b9abcd 100644 --- a/scripts/benchmark.ts +++ b/scripts/benchmark.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' | 1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' |
2 | registerTSPaths() | 2 | registerTSPaths() |
3 | 3 | ||
4 | import * as autocannon from 'autocannon' | 4 | import autocannon, { printResult } from 'autocannon' |
5 | import { writeJson } from 'fs-extra' | 5 | import { writeJson } from 'fs-extra' |
6 | import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' | 6 | import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' |
7 | import { Video, VideoPrivacy } from '@shared/models' | 7 | import { Video, VideoPrivacy } from '@shared/models' |
@@ -149,7 +149,7 @@ async function run () { | |||
149 | Object.assign(testResult, { title: test.title, path: test.path }) | 149 | Object.assign(testResult, { title: test.title, path: test.path }) |
150 | finalResult.push(testResult) | 150 | finalResult.push(testResult) |
151 | 151 | ||
152 | console.log(autocannon.printResult(testResult)) | 152 | console.log(printResult(testResult)) |
153 | } | 153 | } |
154 | 154 | ||
155 | if (outfile) await writeJson(outfile, finalResult) | 155 | if (outfile) await writeJson(outfile, finalResult) |