Skip to content

Commit

Permalink
Merge pull request #1 from TinkoffCreditSystems/to-gatling-3.4.1
Browse files Browse the repository at this point in the history
update gatling version to 3.4.1
  • Loading branch information
red-bashmak authored Nov 17, 2020
2 parents f0f94c7 + d6b574d commit 374dc22
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import sbt._

object Dependencies {
lazy val gatling: Seq[ModuleID] = Seq(
"io.gatling" % "gatling-core" % "3.3.1" % "provided",
"io.gatling" % "gatling-test-framework" % "3.3.1" % "provided"
"io.gatling" % "gatling-core" % "3.4.1" % "provided",
"io.gatling" % "gatling-test-framework" % "3.4.1" % "provided"
)

lazy val hikari = "com.zaxxer" % "HikariCP" % "2.3.2"
lazy val hikari = "com.zaxxer" % "HikariCP" % "3.4.5"
// https://mvnrepository.com/artifact/com.h2database/h2
lazy val h2jdbc = "com.h2database" % "h2" % "1.4.200" % Test

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# suppress inspection "UnusedProperty"
sbt.version=1.3.10
sbt.version=1.3.13
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("io.gatling" % "gatling-sbt" % "3.0.0")
addSbtPlugin("io.gatling" % "gatling-sbt" % "3.2.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.4")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
5 changes: 2 additions & 3 deletions src/main/scala/ru/tinkoff/load/jdbc/actions/ActionBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ trait ActionBase {
responseCode: Option[String],
message: Option[String]
): Unit = {
ctx.coreComponents.statsEngine.logResponse(session, requestName, sent, received, status, responseCode, message)
val s = session.logGroupRequestTimings(sent, received)
next ! s.copy(drift = ctx.coreComponents.clock.nowMillis - received + s.drift)
ctx.coreComponents.statsEngine.logResponse(session.scenario, session.groups, requestName, sent, received, status, responseCode, message)
next ! session.logGroupRequestTimings(sent, received)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ case class DBCallAction(
_ => executeNext(session, startTime, ctx.coreComponents.clock.nowMillis, OK, next, rn, None, None)
)).onFailure(m =>
requestName(session).map { rn =>
ctx.coreComponents.statsEngine.logCrash(session, rn, m)
ctx.coreComponents.statsEngine.logCrash(session.scenario, session.groups, rn, m)
executeNext(session,
ctx.coreComponents.clock.nowMillis,
ctx.coreComponents.clock.nowMillis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ case class DBInsertAction(
_ => executeNext(session, startTime, ctx.coreComponents.clock.nowMillis, OK, next, rn, None, None)
)).onFailure(m =>
requestName(session).map { rn =>
ctx.coreComponents.statsEngine.logCrash(session, rn, m)
ctx.coreComponents.statsEngine.logCrash(session.scenario, session.groups, rn, m)
executeNext(session,
ctx.coreComponents.clock.nowMillis,
ctx.coreComponents.clock.nowMillis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ case class DBQueryAction(
))
.onFailure(m =>
requestName(session).map { rn =>
ctx.coreComponents.statsEngine.logCrash(session, rn, m)
ctx.coreComponents.statsEngine.logCrash(session.scenario, session.groups, rn, m)
executeNext(session,
ctx.coreComponents.clock.nowMillis,
ctx.coreComponents.clock.nowMillis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case class DBRawQueryAction(requestName: Expression[String], query: Expression[S
))
.onFailure(m =>
requestName(session).map { rn =>
ctx.coreComponents.statsEngine.logCrash(session, rn, m)
ctx.coreComponents.statsEngine.logCrash(session.scenario, session.groups, rn, m)
executeNext(session,
ctx.coreComponents.clock.nowMillis,
ctx.coreComponents.clock.nowMillis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.gatling.core.protocol.ProtocolComponents
import io.gatling.core.session.Session

case class JdbcComponents(pool: HikariDataSource) extends ProtocolComponents{
override def onStart: Session => Session = ProtocolComponents.NoopOnStart
override def onStart: Session => Session = Session.Identity

override def onExit: Session => Unit = ProtocolComponents.NoopOnExit
}

0 comments on commit 374dc22

Please sign in to comment.