File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 14
14
. ' -b - branch report file ' . PHP_EOL
15
15
. ' -o - output xml file ' . PHP_EOL
16
16
. ' -p - percent of measurements, that will be skipped (default = 15) ' . PHP_EOL
17
- . ' -t - plain text report file (optional) ' . PHP_EOL ;
17
+ . ' -t - plain text report file (optional) ' . PHP_EOL
18
+ . ' -d - threshold for improvement/degradation for plain-text report (default = 1.5) ' . PHP_EOL ;
18
19
19
- $ args = getopt ('m:b:o:p:t: ' );
20
+ $ args = getopt ('m:b:o:p:t:d: ' );
20
21
if (empty ($ args )) {
21
22
echo $ usageMessage ;
22
23
exit (0 );
27
28
$ outputFile = $ args ['o ' ];
28
29
$ plainReportFile = isset ($ args ['t ' ]) ? $ args ['t ' ] : false ;
29
30
$ skipMeasurementsPercent = isset ($ args ['p ' ]) && $ args ['p ' ] != '' ? min (100 , max (0 , $ args ['p ' ])) : 15 ;
31
+ $ threshold = isset ($ args ['d ' ]) ? $ args ['d ' ] : 1.5 ;
30
32
31
33
try {
32
34
$ mainlineResults = readResponseTimeReport ($ mainlineFile );
71
73
) :
72
74
'' ,
73
75
$ success ?
74
- ($ deviation < -1.5 ? 'improvement ' : ($ deviation > 1.5 ? 'DEGRADATION ' : 'ok ' )) :
76
+ ($ deviation < -$ threshold ? 'improvement ' : ($ deviation > $ threshold ? 'DEGRADATION ' : 'ok ' )) :
75
77
'FAILED '
76
78
];
77
79
}
You can’t perform that action at this time.
0 commit comments