根据文档,我正在为我的斜坡值使用一个参数,
val rampUpRate = Integer.getInteger("ramp", 1)
setUp(
scn.users(10).ramp(rampUpRate).protocolConfig(httpConf)
)
但是当我运行 gatling 时,我得到了一个错误:
09:57:35.695 [ERROR] c.e.e.g.a.ZincCompiler$ - /Gatling/user-files/simulations/clients/com/mydomain/www/stress/RecordedSimulation.scala:1088: overloaded method value ramp with alternatives:
(duration: akka.util.Duration)com.excilys.ebi.gatling.core.scenario.configuration.ConfiguredScenarioBuilder <and>
(duration: Long)com.excilys.ebi.gatling.core.scenario.configuration.Configured
ScenarioBuilder
cannot be applied to (java.lang.Integer)
我以为我可以在使用参数之前简单地转换为 Long
val rampUpRate = Integer.getInteger("ramp", 1)
setUp(
scn.users(10).ramp((Long) rampUpRate).protocolConfig(httpConf)
)
但这仍然错误:
09:57:35.695 [ERROR] c.e.e.g.a.ZincCompiler$ - /Gatling/user-files/simulations/clients/com/mydomain/www/stress/RecordedSimulation.scala:1088: \sanctuarySpa\com\sanctuaryspa\www\stress\RecordedSimulation.scala:1088:
value rampUpRate is not a member of object Long
10:05:34.915 [ERROR] c.e.e.g.a.ZincCompiler$ - scn1.users(10).ramp((Long) rampUpRate).protocolConfig(httpConf),
有什么建议为什么遵循文档或显式转换为 long 不起作用?