From a9cd881bf8837b79ab06696f2140e20cb25af558 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 12 Nov 2021 11:08:20 +0100 Subject: Add benchmark startup option for server --- server.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server.ts') 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' cli .option('--no-client', 'Start PeerTube without client interface') .option('--no-plugins', 'Start PeerTube without plugins/themes enabled') + .option('--benchmark-startup', 'Automatically stop server when initialized') .parse(process.argv) // ----------- App ----------- @@ -324,6 +325,8 @@ async function startApplication () { logger.info('Web server: %s', WEBSERVER.URL) Hooks.runAction('action:application.listening') + + if (cliOptions['benchmarkStartup']) process.exit(0) }) process.on('exit', () => { -- cgit v1.2.3