diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:47:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch) | |
tree | eaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /scripts/benchmark.ts | |
parent | 89d241a79c262b9775c233b73cff080043ebb5e6 (diff) | |
download | PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip |
Use an object to represent a server
Diffstat (limited to 'scripts/benchmark.ts')
-rw-r--r-- | scripts/benchmark.ts | 6 |
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 @@ | |||
1 | import * as autocannon from 'autocannon' | 1 | import * as autocannon from 'autocannon' |
2 | import { writeJson } from 'fs-extra' | 2 | import { writeJson } from 'fs-extra' |
3 | import { flushAndRunServer, killallServers, ServerInfo, setAccessTokensToServers } from '@shared/extra-utils' | 3 | import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' |
4 | import { Video, VideoPrivacy } from '@shared/models' | 4 | import { Video, VideoPrivacy } from '@shared/models' |
5 | import { registerTSPaths } from '../server/helpers/register-ts-paths' | 5 | import { registerTSPaths } from '../server/helpers/register-ts-paths' |
6 | 6 | ||
7 | registerTSPaths() | 7 | registerTSPaths() |
8 | 8 | ||
9 | let server: ServerInfo | 9 | let server: PeerTubeServer |
10 | let video: Video | 10 | let video: Video |
11 | let threadId: number | 11 | let threadId: number |
12 | 12 | ||
@@ -188,7 +188,7 @@ function runBenchmark (options: { | |||
188 | } | 188 | } |
189 | 189 | ||
190 | async function prepare () { | 190 | async 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 |