diff --git a/src/main/scala/org/znsio/perfiz/KarateFeature.scala b/src/main/scala/org/znsio/perfiz/KarateFeature.scala new file mode 100644 index 0000000..d47088b --- /dev/null +++ b/src/main/scala/org/znsio/perfiz/KarateFeature.scala @@ -0,0 +1,34 @@ +package org.znsio.perfiz + +import java.util.{ArrayList, List} + +import org.znsio.perfiz.ClosedWorkloadModel.{ConstantConcurrentUsers, RampConcurrentUsers} +import org.znsio.perfiz.OpenWorkloadModel._ + +import scala.beans.BeanProperty +import scala.jdk.CollectionConverters._ +import scala.language.postfixOps + +class KarateFeature { + @BeanProperty + var karateFile: String = _ + + @BeanProperty + var gatlingSimulationName: String = _ + + @BeanProperty + var loadPattern: List[GatlingWorkLoadModelStep] = new ArrayList[GatlingWorkLoadModelStep]() + + @BeanProperty + var uriPatterns: List[String] = new ArrayList[String]() + + def openWorkloadModelSteps = loadPattern.asScala.toList.filter(loadPattern => { + val openModelLoadPatterns = scala.List(NothingFor, AtOnceUsers, RampUsers, ConstantUsersPerSecond, RampUsersPerSecond, HeavisideUsers) + openModelLoadPatterns.contains(loadPattern.patternType) + }) + + def closedWorkloadModelSteps = loadPattern.asScala.toList.filter(loadPattern => { + val closedModelLoadPatterns = scala.List(ConstantConcurrentUsers, RampConcurrentUsers) + closedModelLoadPatterns.contains(loadPattern.patternType) + }) +} \ No newline at end of file diff --git a/src/main/scala/perfiz/PerfizConfiguration.scala b/src/main/scala/org/znsio/perfiz/PerfizConfiguration.scala similarity index 63% rename from src/main/scala/perfiz/PerfizConfiguration.scala rename to src/main/scala/org/znsio/perfiz/PerfizConfiguration.scala index edcbca1..98aa856 100644 --- a/src/main/scala/perfiz/PerfizConfiguration.scala +++ b/src/main/scala/org/znsio/perfiz/PerfizConfiguration.scala @@ -5,12 +5,9 @@ import java.util.{ArrayList, List} import org.yaml.snakeyaml.Yaml import org.yaml.snakeyaml.constructor.Constructor -import org.znsio.perfiz.ClosedWorkloadModel._ -import org.znsio.perfiz.OpenWorkloadModel._ import scala.beans.BeanProperty import scala.concurrent.duration.{Duration, FiniteDuration} - import scala.jdk.CollectionConverters._ import scala.language.postfixOps @@ -35,30 +32,6 @@ object PerfizConfiguration { ) } -class KarateFeature { - @BeanProperty - var karateFile: String = _ - - @BeanProperty - var gatlingSimulationName: String = _ - - @BeanProperty - var loadPattern: List[GatlingWorkLoadModelStep] = new ArrayList[GatlingWorkLoadModelStep]() - - @BeanProperty - var uriPatterns: List[String] = new ArrayList[String]() - - def openWorkloadModelSteps = loadPattern.asScala.toList.filter(loadPattern => { - val openModelLoadPatterns = scala.List(NothingFor, AtOnceUsers, RampUsers, ConstantUsersPerSecond, RampUsersPerSecond, HeavisideUsers) - openModelLoadPatterns.contains(loadPattern.patternType) - }) - - def closedWorkloadModelSteps = loadPattern.asScala.toList.filter(loadPattern => { - val closedModelLoadPatterns = scala.List(ConstantConcurrentUsers, RampConcurrentUsers) - closedModelLoadPatterns.contains(loadPattern.patternType) - }) -} - class GatlingWorkLoadModelStep { @BeanProperty var patternType: String = _