Skip to content

Instantly share code, notes, and snippets.

@jacopen
Created January 30, 2015 06:32
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 jacopen/0596b6f73ee15fb4f074 to your computer and use it in GitHub Desktop.
Save jacopen/0596b6f73ee15fb4f074 to your computer and use it in GitHub Desktop.
ガトるよ
package basic
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.Headers.Names._
import scala.concurrent.duration._
import bootstrap._
import assertions._
class BasicLBASimulation extends Simulation {
val httpProtocol = http
.baseURL("URL HERE")
.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("10 requests")
.repeat(10){
exec(http("Request").get("/index.html"))
}
setUp(scn.inject(ramp(36000 users) over (3600 seconds)))
.protocols(httpProtocol)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment