Skip to content

Commit

Permalink
update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
tellnobody1 committed Sep 12, 2024
1 parent bf5c1d6 commit 180fd0e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 12 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ curl -X TRACE -d 'こんにちは' http://localhost:9012

## benchmark

| | req/s | 99th pct | |
| -------- | -----:| --------:|-----:|
| frontier | 75 | 37 | 100% |
| ziohttp | 75 | 39 | 95% |
| akkahttp | 75 | 60 | 62% |
| | req/s | 99th pct | score| failed |
| -------- | -----:| --------:|-----:|-------:|
| frontier | 525 | 66 | 100% | 0% |
| ziohttp | 525 | 89 | 74% | 0% |
| akkahttp | 475 | 248 | 27% | 10.58% |

```sh
ulimit -n 65536
sbt 'project benchmark' run
ulimit -n 65536
sbt 'project it' GatlingIt/test
```
20 changes: 20 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ lazy val benchmark = project
, "-Xfatal-warnings"
)
, run / fork := true
, run / javaOptions := Seq(
"-Xms8g",
"-Xmx8g",
)
).dependsOn(ftier)

lazy val it = project
Expand All @@ -62,6 +66,22 @@ lazy val it = project
, scalaVersion := "2.13.14"
, scalacOptions += "-Xsource:3"
, run / fork := true
, run / javaOptions := Seq(
"-Xms8g",
"-Xmx8g",
"-XX:+UseSerialGC",
"-XX:+DisableExplicitGC",
"-XX:+TieredCompilation",
"-XX:TieredStopAtLevel=1",
"-XX:+AggressiveOpts",
"-XX:+AlwaysPreTouch",
"-XX:CompileThreshold=100",
"-XX:-UseBiasedLocking",
"-XX:+UseLargePages",
"-XX:+UseNUMA",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseFastUnorderedTimeStamps",
)
).enablePlugins(GatlingPlugin)

ThisBuild / turbo := true
Expand Down
14 changes: 14 additions & 0 deletions it/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Setup

```sh
sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536
sbt 'project benchmark' run

sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536
sdk use java 11.0.24-tem
sbt 'project it' GatlingIt/test
```
2 changes: 1 addition & 1 deletion it/src/it/scala/it.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ class BenchmarkSimulation extends Simulation {
}
.exec(ws("Close WS").close)

setUp(scn.inject(atOnceUsers(50)).protocols(httpProtocol))
setUp(scn.inject(atOnceUsers(350)).protocols(httpProtocol))
}

0 comments on commit 180fd0e

Please sign in to comment.