File tree 3 files changed +48
-2
lines changed
3 files changed +48
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ mvn gatling:execute -Dgatling.simulationClass=soujava.BenchmarkGeneric -DNUM_THR
123
123
outputs
124
124
```
125
125
126
- $ mvn gatling:execute -Dgatling.simulationClass=soujava.BenchmarkGeneric -DNUM_THREADS=100 -DRAMP_TIME=100 -DDURATION=60 -DTARGET=http://vertx-simple-json-endpoint.herokuapp.com -DENDPOINT=/hello -DENDPOINT_NAME=HELLO_WORLD_VERTEX
126
+ mvn gatling:execute -Dgatling.simulationClass=soujava.BenchmarkGeneric -DNUM_THREADS=100 -DRAMP_TIME=100 -DDURATION=60 -DTARGET=http://vertx-simple-json-endpoint.herokuapp.com -DENDPOINT=/hello -DENDPOINT_NAME=HELLO_WORLD_VERTEX
127
127
[INFO] Scanning for projects...
128
128
[INFO]
129
129
[INFO] ------------------------------------------------------------------------
@@ -196,16 +196,24 @@ Please open the following file: /opt/scala/scala-gatling-bootstrap-mvn/target/ga
196
196
[INFO] ------------------------------------------------------------------------
197
197
```
198
198
199
+ Running generic benchmark feed race_for_speed.csv:
200
+ Java Vertex VS Scala VS Nodejs VS Golang
201
+ ```
202
+ mvn gatling:execute -Dgatling.simulationClass=soujava.BenchmarkGenericFeed -DNUM_THREADS=1 -DRAMP_TIME=1 -DDURATION=60 -DTARGET=race_for_speed.csv -DENDPOINT_NAME=vertexVSscalaVSnodejsVSgolang
203
+ ```
204
+
199
205
200
206
Running Tests for Websocket
201
207
============
202
208
TODO: Work in progress
203
-
209
+ [ # 20 ] ( https://github.com/soujava/soujava-test-kit/issues/20 )
204
210
205
211
206
212
Running Tests for JMS
207
213
============
208
214
TODO: Work in progress
215
+ [ #19 ] ( https://github.com/soujava/soujava-test-kit/issues/19 )
216
+
209
217
210
218
211
219
Original file line number Diff line number Diff line change
1
+ url,name
2
+ http://vertx-simple-json-endpoint.herokuapp.com/hello,vertex
3
+ http://sheltered-tor-1754.herokuapp.com/hello,scala
4
+ http://desolate-harbor-2201.herokuapp.com/hello,nodejs
5
+ http://limitless-basin-5531.herokuapp.com/hello,golang13
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @author : Thomas Modeneis
3
+ */
4
+ package soujava
5
+
6
+ import scala .concurrent .duration ._
7
+ import io .gatling .core .Predef ._
8
+ import io .gatling .http .Predef ._
9
+ import io .gatling .jdbc .Predef ._
10
+
11
+ class BenchmarkGenericFeed extends Simulation {
12
+
13
+ def threads_ = System .getProperty(" NUM_THREADS" )
14
+ def rampup_ = System .getProperty(" RAMP_TIME" )
15
+ def duration_ = System .getProperty(" DURATION" )
16
+ def target = System .getProperty(" TARGET" )
17
+ def endpointName_ = System .getProperty(" ENDPOINT_NAME" )
18
+
19
+ val threads = Integer .getInteger(" threads" , threads_.toInt)
20
+ val rampup = Integer .getInteger(" rampup" , rampup_.toInt).toInt
21
+ val duration = Integer .getInteger(" duration" , duration_.toInt).toInt
22
+
23
+ val feeder = csv(target).random
24
+
25
+ val get_endpoint = feed(feeder).exec(http(" ${name}" ).get(" ${url}" ))
26
+
27
+ val scn = scenario(endpointName_)
28
+ .forever(" counter" ) {
29
+ randomSwitch(100.0 -> get_endpoint)
30
+ }
31
+ setUp(scn.inject(rampUsers(threads) over rampup))
32
+ .maxDuration(duration)
33
+ }
You can’t perform that action at this time.
0 commit comments