aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/simulate-many-viewers.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/simulate-many-viewers.ts b/scripts/simulate-many-viewers.ts
index fb666c318..a993e175a 100644
--- a/scripts/simulate-many-viewers.ts
+++ b/scripts/simulate-many-viewers.ts
@@ -46,10 +46,12 @@ async function prepare () {
46 } 46 }
47 } 47 }
48 48
49 const env = { PRODUCTION_CONSTANTS: 'true' }
50
49 servers = await Promise.all([ 51 servers = await Promise.all([
50 createSingleServer(1, config, { nodeArgs: [ '--inspect' ] }), 52 createSingleServer(1, config, { env, nodeArgs: [ '--inspect' ] }),
51 createSingleServer(2, config), 53 createSingleServer(2, config, { env }),
52 createSingleServer(3, config) 54 createSingleServer(3, config, { env })
53 ]) 55 ])
54 56
55 await setAccessTokensToServers(servers) 57 await setAccessTokensToServers(servers)
@@ -81,7 +83,7 @@ async function runViewers () {
81 83
82 await Bluebird.map(viewers, viewer => { 84 await Bluebird.map(viewers, viewer => {
83 return servers[0].views.simulateView({ id: videoId, xForwardedFor: viewer.xForwardedFor }) 85 return servers[0].views.simulateView({ id: videoId, xForwardedFor: viewer.xForwardedFor })
84 }, { concurrency: 100 }) 86 }, { concurrency: 500 })
85 87
86 console.log('Finished to run views in %d seconds.', (new Date().getTime() - before) / 1000) 88 console.log('Finished to run views in %d seconds.', (new Date().getTime() - before) / 1000)
87 89