aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /scripts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'scripts')
-rw-r--r--scripts/benchmark.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/benchmark.ts b/scripts/benchmark.ts
index 1d980063b..071c4dea7 100644
--- a/scripts/benchmark.ts
+++ b/scripts/benchmark.ts
@@ -1,12 +1,12 @@
1import * as autocannon from 'autocannon' 1import * as autocannon from 'autocannon'
2import { writeJson } from 'fs-extra' 2import { writeJson } from 'fs-extra'
3import { flushAndRunServer, killallServers, ServerInfo, setAccessTokensToServers } from '@shared/extra-utils' 3import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
4import { Video, VideoPrivacy } from '@shared/models' 4import { Video, VideoPrivacy } from '@shared/models'
5import { registerTSPaths } from '../server/helpers/register-ts-paths' 5import { registerTSPaths } from '../server/helpers/register-ts-paths'
6 6
7registerTSPaths() 7registerTSPaths()
8 8
9let server: ServerInfo 9let server: PeerTubeServer
10let video: Video 10let video: Video
11let threadId: number 11let threadId: number
12 12
@@ -188,7 +188,7 @@ function runBenchmark (options: {
188} 188}
189 189
190async function prepare () { 190async function prepare () {
191 server = await flushAndRunServer(1, { 191 server = await createSingleServer(1, {
192 rates_limit: { 192 rates_limit: {
193 api: { 193 api: {
194 max: 5_000_000 194 max: 5_000_000