Package org.apache.jmeter.functions
Class TimeShift
java.lang.Object
org.apache.jmeter.functions.AbstractFunction
org.apache.jmeter.functions.TimeShift
- All Implemented Interfaces:
org.apache.jmeter.functions.Function
@AutoService(org.apache.jmeter.functions.Function.class)
public class TimeShift
extends org.apache.jmeter.functions.AbstractFunction
timeShifting Function permit to shift a date
Parameters:
- format date @see https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html (optional - defaults to epoch time in millisecond)
- date to shift formatted as first param (optional - defaults now)
- amount of (seconds, minutes, hours, days ) to add (optional - default nothing is add)
- a string of the locale for the format ( optional )
- variable name ( optional )
a formatted date with the specified number of (seconds, minutes, hours, days or months ) added. Value is also saved in the variable for later re-use.
- Since:
- 3.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute
(org.apache.jmeter.samplers.SampleResult previousResult, org.apache.jmeter.samplers.Sampler currentSampler) void
setParameters
(Collection<org.apache.jmeter.engine.util.CompoundVariable> parameters) Methods inherited from class org.apache.jmeter.functions.AbstractFunction
addVariableValue, checkMinParameterCount, checkParameterCount, checkParameterCount, execute, getVariables
-
Constructor Details
-
TimeShift
public TimeShift()
-
-
Method Details
-
execute
public String execute(org.apache.jmeter.samplers.SampleResult previousResult, org.apache.jmeter.samplers.Sampler currentSampler) throws org.apache.jmeter.functions.InvalidVariableException - Specified by:
execute
in interfaceorg.apache.jmeter.functions.Function
- Specified by:
execute
in classorg.apache.jmeter.functions.AbstractFunction
- Throws:
org.apache.jmeter.functions.InvalidVariableException
-
setParameters
public void setParameters(Collection<org.apache.jmeter.engine.util.CompoundVariable> parameters) throws org.apache.jmeter.functions.InvalidVariableException - Specified by:
setParameters
in interfaceorg.apache.jmeter.functions.Function
- Specified by:
setParameters
in classorg.apache.jmeter.functions.AbstractFunction
- Throws:
org.apache.jmeter.functions.InvalidVariableException
-
getReferenceKey
- Specified by:
getReferenceKey
in interfaceorg.apache.jmeter.functions.Function
- Specified by:
getReferenceKey
in classorg.apache.jmeter.functions.AbstractFunction
-
getArgumentDesc
-