forked from mathieuancelin/play2-couchbase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CouchSimulation.gatling
executable file
·34 lines (30 loc) · 1.72 KB
/
CouchSimulation.gatling
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
package couch
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import akka.util.duration._
import bootstrap._
class CouchSimulation extends Simulation {
val httpConf = httpConfig
.baseURL("http://localhost:9000/api")
.acceptCharsetHeader("ISO-8859-1,utf-8;q=0.7,*;q=0.7")
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.acceptEncodingHeader("gzip, deflate")
.acceptLanguageHeader("fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3")
.disableFollowRedirect
val scn = scenario("Test couchbase plugin").repeat(100) {
exec(http("request_0").get("/urls")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_1").get("/urls/103")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_2").get("/urls/116")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_3").get("/urls/117")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_4").get("/urls/118")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_5").get("/urls/119")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_6").get("/urls/120")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_7").get("/urls/121")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_8").get("/urls/122")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_9").get("/urls/123")).pause(0 milliseconds, 1 milliseconds).
exec(http("request_10").get("/urls/124")).pause(0 milliseconds, 1 milliseconds)
}
setUp(scn.users(200).ramp(1).protocolConfig(httpConf))
}