Gatling???????????????????
???????????? ???????[ 2015/8/3 14:15:53 ] ??????????????????
????Gatling???????????????????????Scala?? Akka and Netty??
???????????????????????????д?????????б????????????????
???????????????????????????????csv??json??jdbc??redis??????????????
??????????????????????
?????????????????????????
????????????
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
class RecordedSimulation extends Simulation {
val httpProtocol = http
.baseURL("http://192.168.1.117/")
.acceptHeader("""*/*""")
.acceptEncodingHeader("""gzip?? deflate""")
.acceptLanguageHeader("""zh-CN""")
.userAgentHeader("""Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)""")
val headers_2 = Map("""Accept""" -> """text/html?? application/xhtml+xml?? */*""")
val scn = scenario("RecordedSimulation")
.repeat(1){
//.forever{
feed(csv("large_files.csv").circular)
.exec(http("request_"+"${id}")
.get("${uri}")
.headers(headers_2)
//.check(status.is(200)))
.check(status.in(200 to 399)))
.pause(1)
}
setUp(
scn.inject(atOnceUsers(1000))
)
.protocols(httpProtocol)
}
large_files.csv??????user-files/data/????
????????????
????id??uri
????1??index.html
????2??download/file.zip
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11