I have created a Test Fragment with a JSR223 Post Processor and placed it just after the Test Plan component to ensure it is applied to all the Samplers in the Test Plan.

Add the following arguments into the Parameters
${__P(ignore_ramping_time_results,true)} ${__P(testResultToIgnoreBeforeInMin,5)} ${__P(testResultToIgnoreAfterInMin,65)}
arg[0]
- Set true
to ignore the result and false
to include the result
arg[1]
- Set the ramp-up time in minutes. If you set 2, test results during the first two minutes will be ignored
arg[2]
- Set the ramp-down start time in minutes. If you set it to 10, all the results after 10 minutes will be ignored.

if(args[0].toBoolean()){
int testResultToIgnoreBeforeInMin=args[1].toInteger()
int testResultToIgnoreAfterInMin=args[2].toInteger()
long testResultToIgnoreBeforeInMillis=testResultToIgnoreBeforeInMin*60*1000
long testResultToIgnoreAfterInMillis=testResultToIgnoreAfterInMin*60*1000
long startTimeInMillis=vars.get("TESTSTART.MS").toLong()
long currentTimeInMillis = new Date().getTime()
long currentTestDurationInMillis=currentTimeInMillis-startTimeInMillis
log.info("currentTestDurationInMillis ${currentTestDurationInMillis}")
if(currentTestDurationInMillis< testResultToIgnoreBeforeInMillis || currentTestDurationInMillis >testResultToIgnoreAfterInMillis){
prev.setIgnore()
log.info("Test result is ignored")
}
}
Pre-Defined Property
TESTSTART.MS
- test start time in milliseconds
is used in the script to get the test start time.