Skip to content

Instantly share code, notes, and snippets.

@aartajew
Created April 20, 2023 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aartajew/0d7f9f32a869b880627a53b23d7df8b1 to your computer and use it in GitHub Desktop.
Save aartajew/0d7f9f32a869b880627a53b23d7df8b1 to your computer and use it in GitHub Desktop.
Gatling > Pause user in a loop except first iteration
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