Java 从gatling模拟代码获取场景报告统计信息

Java 从gatling模拟代码获取场景报告统计信息,java,scala,gatling,scala-gatling,Java,Scala,Gatling,Scala Gatling,如何从Gatling simulation获取报告统计信息(不希望分析报告) 例如: val sncInstruAssertion: ScenarioBuilder = scenario("Instrument Assertion") .during(Duration(10, TimeUnit.MINUTES)){ exec( new CustomActionBuilder( "Assert Instrumen

如何从Gatling simulation获取报告统计信息(不希望分析报告)

例如:

val sncInstruAssertion: ScenarioBuilder = scenario("Instrument Assertion")
    .during(Duration(10, TimeUnit.MINUTES)){
      exec(
        new CustomActionBuilder(
          "Assert Instrument message on Kafka",
          () => {
            latchForInstrument.reset()
            latchForInstrument.await(1, TimeUnit.MINUTES)
            if(latchForInstrument.getCount == 0) {
              OK
            } else {
              KO
            }
          }
        )
      )}

setUp(
    sncInstruAssertion.inject(atOnceUsers(1))
  ).assertions(
    details("Assert Instrument message on Kafka").successfulRequests.percent.is(100),
    details("Assert Instrument message on Kafka").responseTime.mean.between(50, 1500),
    details("Assert Instrument message on Kafka").responseTime.percentile(90).between(100, 2500)
  )
如何获取successfulRequests.percent、responseTime.mean和responseTime.percentile值并将其存储在变量中