aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-12 11:08:20 +0100
committerChocobozzz <me@florianbigard.com>2021-11-12 11:08:30 +0100
commita9cd881bf8837b79ab06696f2140e20cb25af558 (patch)
tree3d5b0d6df2b60aa36c0b3100189dc14f2e47ecc3 /server.ts
parent8db19c959e437521db195e3cce96cb4386ed51c1 (diff)
downloadPeerTube-a9cd881bf8837b79ab06696f2140e20cb25af558.tar.gz
PeerTube-a9cd881bf8837b79ab06696f2140e20cb25af558.tar.zst
PeerTube-a9cd881bf8837b79ab06696f2140e20cb25af558.zip
Add benchmark startup option for server
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server.ts b/server.ts
index 6a7dad0cd..f04e993f6 100644
--- a/server.ts
+++ b/server.ts
@@ -136,6 +136,7 @@ import { VideoViews } from '@server/lib/video-views'
136cli 136cli
137 .option('--no-client', 'Start PeerTube without client interface') 137 .option('--no-client', 'Start PeerTube without client interface')
138 .option('--no-plugins', 'Start PeerTube without plugins/themes enabled') 138 .option('--no-plugins', 'Start PeerTube without plugins/themes enabled')
139 .option('--benchmark-startup', 'Automatically stop server when initialized')
139 .parse(process.argv) 140 .parse(process.argv)
140 141
141// ----------- App ----------- 142// ----------- App -----------
@@ -324,6 +325,8 @@ async function startApplication () {
324 logger.info('Web server: %s', WEBSERVER.URL) 325 logger.info('Web server: %s', WEBSERVER.URL)
325 326
326 Hooks.runAction('action:application.listening') 327 Hooks.runAction('action:application.listening')
328
329 if (cliOptions['benchmarkStartup']) process.exit(0)
327 }) 330 })
328 331
329 process.on('exit', () => { 332 process.on('exit', () => {