-
Notifications
You must be signed in to change notification settings - Fork 19
/
CanvasJourney.scala
39 lines (34 loc) · 1.12 KB
/
CanvasJourney.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package org.kibanaLoadTest.simulation.branch
import io.gatling.core.Predef._
import io.gatling.core.Predef.{
constantConcurrentUsers,
rampConcurrentUsers,
scenario
}
import io.gatling.core.structure.ScenarioBuilder
import org.kibanaLoadTest.scenario.Canvas
import org.kibanaLoadTest.simulation.BaseSimulation
class CanvasJourney extends BaseSimulation {
val scenarioName = "CanvasJourney"
props.maxUsers = 200
val steps = feed(circularFeeder)
.exec(session => session.set("Cookie", session("sidValue").as[String]))
.exec(Canvas.loadWorkpad(appConfig.baseUrl, defaultHeaders))
val warmupScn: ScenarioBuilder = scenario("warmup").exec(steps)
val scn: ScenarioBuilder = scenario(scenarioName).exec(steps)
setUp(
warmupScn
.inject(
constantConcurrentUsers(20) during (1 * 30),
rampConcurrentUsers(20) to props.maxUsers during (2 * 60)
)
.protocols(httpProtocol)
.andThen(
scn
.inject(
constantConcurrentUsers(props.maxUsers) during (4 * 60)
)
.protocols(httpProtocol)
)
).maxDuration(props.simulationTimeout * 2)
}