Created
April 20, 2023 10:08
-
-
Save aartajew/0d7f9f32a869b880627a53b23d7df8b1 to your computer and use it in GitHub Desktop.
Gatling > Pause user in a loop except first iteration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util | |
import io.gatling.core.Predef._ | |
import scala.concurrent.duration._ | |
object PauseExceptFirstTime { | |
def apply(counter: String, duration: FiniteDuration) = | |
doIf(_(counter).asOption[Int].getOrElse(0) > 0) { | |
pause(duration) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment