import JvmPauses = io.gatling.javaapi.core.pause.Pauses; import JvmPauseType = io.gatling.javaapi.core.PauseType; import { Duration } from "../utils/duration"; import { SessionTo } from "../session"; export type PauseType = "Disabled" | "Constant" | "Exponential" | { type: "NormalWithPercentageDuration"; stdDev: number; } | { type: "NormalWithStdDevDuration"; stdDev: Duration; } | { type: "Custom"; f: SessionTo; } | { type: "UniformPercentage"; plusOrMinus: number; } | { type: "UniformDuration"; plusOrMinus: Duration; }; export declare const toJvmPauseType: (pauseType: PauseType) => JvmPauseType; export interface PauseFunction> { /** * Attach a pause * * @param duration - the pause duration, in seconds or with an explicit time unit * @returns a new StructureBuilder */ (duration: Duration): T; /** * Attach a pause as a Gatling Expression Language string. This expression must resolve to either a number, then the * unit will be seconds, or an object with an explicit time unit. * * @param duration - the pause duration as a Gatling Expression Language string * @returns a new StructureBuilder */ (duration: string): T; /** * Attach a pause * * @param duration - the pause duration as a function * @returns a new StructureBuilder */ (duration: SessionTo): T; /** * Attach a pause * * @param duration - the pause duration, in seconds or with an explicit time unit * @param pauseType - the type of pause * @returns a new StructureBuilder */ (duration: Duration, pauseType: PauseType): T; /** * Attach a pause as a Gatling Expression Language string. This expression must resolve to either a number, then the * unit will be seconds, or an object with an explicit time unit. * * @param duration - the pause duration as a Gatling Expression Language string * @param pauseType - the type of pause * @returns a new StructureBuilder */ (duration: string, pauseType: PauseType): T; /** * Attach a pause * * @param duration - the pause duration as a function * @param pauseType - the type of pause * @returns a new StructureBuilder */ (duration: SessionTo, pauseType: PauseType): T; /** * Attach a pause computed randomly between 2 values * * @param min the pause minimum, in seconds or with an explicit time unit * @param max the pause maximum, in seconds or with an explicit time unit * @return a new StructureBuilder */ (min: Duration, max: Duration): T; /** * Attach a pause computed randomly between 2 values as a Gatling Expression Language string. These expressions must * resolve to either a number, then the unit will be seconds, or an object with an explicit time unit. * * @param min the pause minimum as a Gatling Expression Language string * @param max the pause maximum as a Gatling Expression Language string * @return a new StructureBuilder */ (min: string, max: string): T; /** * Attach a pause computed randomly between 2 values * * @param min the pause minimum as a function * @param max the pause maximum as a function * @return a new StructureBuilder */ (min: SessionTo, max: SessionTo): T; /** * Attach a pause computed randomly between 2 values * * @param min the pause minimum, in seconds or with an explicit time unit * @param max the pause maximum, in seconds or with an explicit time unit * @param pauseType - the type of pause * @return a new StructureBuilder */ (min: Duration, max: Duration, pauseType: PauseType): T; /** * Attach a pause computed randomly between 2 values as a Gatling Expression Language string. These expressions must * resolve to either a number, then the unit will be seconds, or an object with an explicit time unit. * * @param min the pause minimum as a Gatling Expression Language string * @param max the pause maximum as a Gatling Expression Language string * @param pauseType - the type of pause * @return a new StructureBuilder */ (min: string, max: string, pauseType: PauseType): T; /** * Attach a pause computed randomly between 2 values * * @param min the pause minimum as a function * @param max the pause maximum as a function * @param pauseType - the type of pause * @return a new StructureBuilder */ (min: SessionTo, max: SessionTo, pauseType: PauseType): T; } export interface Pauses> { pause: PauseFunction; } export declare const pauseImpl: , T extends Pauses>(jvmGroups: J1, wrap: (wrapped: J2) => T) => PauseFunction;