aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/benchmark.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-30 14:22:33 +0200
committerChocobozzz <me@florianbigard.com>2021-08-30 14:22:33 +0200
commit736c64ca4bbe6d53241f0a4f805dc81faea49969 (patch)
tree15fcb90c26798158a4277659ce6d51b6bc925cc1 /scripts/benchmark.ts
parent2b36e477bfc5f6b28fe7491ec9d2e6eb1337838b (diff)
downloadPeerTube-736c64ca4bbe6d53241f0a4f805dc81faea49969.tar.gz
PeerTube-736c64ca4bbe6d53241f0a4f805dc81faea49969.tar.zst
PeerTube-736c64ca4bbe6d53241f0a4f805dc81faea49969.zip
Fix benchmark script
Diffstat (limited to 'scripts/benchmark.ts')
-rw-r--r--scripts/benchmark.ts4
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 @@
1import { registerTSPaths } from '../server/helpers/register-ts-paths' 1import { registerTSPaths } from '../server/helpers/register-ts-paths'
2registerTSPaths() 2registerTSPaths()
3 3
4import * as autocannon from 'autocannon' 4import autocannon, { printResult } from 'autocannon'
5import { writeJson } from 'fs-extra' 5import { writeJson } from 'fs-extra'
6import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' 6import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
7import { Video, VideoPrivacy } from '@shared/models' 7import { 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)