@@ -23,7 +23,10 @@ export const PRIVATE_KEY = null;
2323// Long requests time: we don't want requests to go over this time in the p(95) case
2424export const LONG_REQUEST_MS = 5000 ;
2525// Extra long request time: we never want requests to go over this time.
26- export const EXTRA_LONG_REQUEST_MS = 14000 ;
26+ export const EXTRA_LONG_REQUEST_MS = 10000 ;
27+ // Timeout if we go greater than the max request time to ensure we stay
28+ // close to our concurrent user goal.
29+ export const MAX_REQUEST_TIME_MS = 20000 ;
2730
2831// Mini-app types
2932export const MiniAppType = {
@@ -32,28 +35,28 @@ export const MiniAppType = {
3235 THEATER : 'theater'
3336} ;
3437
35- export function getTestOptions ( maxUserGoal , rampUpTimeMinutes , highLoadTimeMinutes ) {
38+ export function getTestOptions ( maxUserGoal , highLoadTimeMinutes ) {
3639 const maxConcurrentUsers = Math . floor ( maxUserGoal / 30 ) ;
3740 return {
3841 scenarios : {
39- // ramp up to maxConcurrentUsers VUs over rampUpTimeMinutes
40- rampUp : {
41- executor : "ramping-vus" ,
42- startVUs : 0 ,
43- stages : [
44- { duration : `${ rampUpTimeMinutes } m` , target : maxConcurrentUsers }
45- ]
42+ halfConcurrency : {
43+ executor : "constant-vus" ,
44+ vus : Math . ceil ( maxConcurrentUsers / 2 ) ,
45+ duration : '1m' ,
4646 } ,
47- // have maxConcurrentUsers VUs do 3 iterations each minute, for a total of highLoadTimeMinutes * 3
48- // iterations per virutal user.
49- // Start this after the ramp up time.
47+ initialHighConcurrency : {
48+ executor : "constant-vus" ,
49+ vus : maxConcurrentUsers ,
50+ duration : '1m' ,
51+ startTime : '1m'
52+ } ,
53+ // maintain maxConcurrentUsers VUs for highLoadTimeMinutes minutes. Start this after first two
54+ // scenarios have completed.
5055 highLoad : {
51- executor : "per-vu-iterations " ,
56+ executor : "constant-vus " ,
5257 vus : maxConcurrentUsers ,
53- iterations : 3 * highLoadTimeMinutes , // this is iterations per virtual user
54- // add a large buffer to max duration to ensure all requests can complete.
55- maxDuration : `${ highLoadTimeMinutes + ( Math . ceil ( highLoadTimeMinutes * 0.5 ) ) } m` ,
56- startTime : `${ rampUpTimeMinutes } m` ,
58+ duration : `${ highLoadTimeMinutes } m` ,
59+ startTime : '2m' ,
5760 }
5861 } ,
5962 thresholds : {
0 commit comments