Fix benchmark script
This commit is contained in:
parent
2b36e477bf
commit
736c64ca4b
|
@ -1,7 +1,7 @@
|
||||||
import { registerTSPaths } from '../server/helpers/register-ts-paths'
|
import { registerTSPaths } from '../server/helpers/register-ts-paths'
|
||||||
registerTSPaths()
|
registerTSPaths()
|
||||||
|
|
||||||
import * as autocannon from 'autocannon'
|
import autocannon, { printResult } from 'autocannon'
|
||||||
import { writeJson } from 'fs-extra'
|
import { writeJson } from 'fs-extra'
|
||||||
import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
||||||
import { Video, VideoPrivacy } from '@shared/models'
|
import { Video, VideoPrivacy } from '@shared/models'
|
||||||
|
@ -149,7 +149,7 @@ async function run () {
|
||||||
Object.assign(testResult, { title: test.title, path: test.path })
|
Object.assign(testResult, { title: test.title, path: test.path })
|
||||||
finalResult.push(testResult)
|
finalResult.push(testResult)
|
||||||
|
|
||||||
console.log(autocannon.printResult(testResult))
|
console.log(printResult(testResult))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outfile) await writeJson(outfile, finalResult)
|
if (outfile) await writeJson(outfile, finalResult)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user