Hi,
I am trying to extend the gatling kafka extension (by Muneyuki Noguchi) for consumers, using the gatling-jms module as a template.
it works after a fashion. (But I’m coming to grips with the combination of Scala, Akka and Gatling so it could be definitely
improved.There are some TODO's ..)
In any case I have one particular issue I was wondering about. After a successful run my
active users is -20 and percentage is 200%. Instead of 0 and 100% (see example put below)
https://github.com/caoimhindenais/gatling-kafka
I update the stats in this package (KafkaRequestTrackerActor.scala)
statsEngine.logResponse(session, title, timings, status, None, message)
next ! session.logGroupRequest(timings.responseTime, status).increaseDrift(nowMillis - received)
Is this something you’ve seen before or can shed some light on?
Thanks for any insights,
Kevin
Simulation util.BasicSimulation started...
================================================================================
2018-03-14 17:03:47 5s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=20 KO=0 )
> Send Kafka Message (OK=20 KO=0 )
---- Kafka Test ----------------------------------------------------------------
[####################################################################################################################################################]200%
waiting: 0 / active: -20 / done:40
ConsoleDataWriter onUserMessage
case End =>
usersCounters.get(session.scenario) match {
case Some(name) => name.userDone()
case _ => logger.error(s"Internal error, scenario '${session.scenario}' has not been correctly initialized")
}
Envelope(UserMessage(Session(Kafka Test,1,Map(),1521404578214,0,OK,List(),io.gatling.core.protocol.ProtocolComponentsRegistry$$Lambda$283/1641027464@4193d921),End,1521404578430),Actor[akka://GatlingSystem/deadLetters])
So for this scenario, 5 Users
scn
.inject(constantUsersPerSec(1) during (5 seconds))).maxDuration(7 seconds)
.protocols(kafkaConf)
waiting: 0 / active: -5 / done:10
The producer was closing the session and then the consumer was.
The session should finish when the consumer has received and verified the Kafka message.
Anyway active users are looking better now :-)
================================================================================
2018-03-24 16:30:27 46s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=750000 KO=0 )
> Send Kafka Message (OK=750000 KO=0 )
---- Kafka Test ----------------------------------------------------------------
[##########################################################################]100%
waiting: 0 / active: 0 / done:750000
================================================================================