Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded to support gatling 1.3.4 + Added redis and byteArrayBody sim…
…ulations
- Loading branch information
Showing
15 changed files
with
260 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1 @@ | |||
sbt.version=0.11.3 | sbt.version=0.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
mainClass in Compile := Some("Engine") | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,12 +1,16 @@ | |||
resolvers += "Another Typesafe Repo" at "http://repo.akka.io/releases/" | resolvers += "Another Typesafe Repo" at "http://repo.akka.io/releases/" | ||
|
|
||
resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns) | |||
|
|||
resolvers += Classpaths.typesafeResolver | resolvers += Classpaths.typesafeResolver | ||
|
|
||
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0") | addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0") | ||
|
|||
addSbtPlugin("com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.3") | |||
|
|
||
addSbtPlugin("com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.2") | addSbtPlugin("cc.spray" % "sbt-revolver" % "0.6.1") | ||
|
|
||
resolvers += Resolver.url("sbt-plugin-releases", | resolvers += Resolver.url("sbt-plugin-releases", | ||
new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns) | new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns) | ||
|
|
||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.1") | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.4") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
#################################### | |||
# Akka Actor Config File # | |||
#################################### | |||
|
|||
akka { | |||
scheduler { | |||
tick-duration = 50ms | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,12 +1,51 @@ | |||
import com.excilys.ebi.gatling.app.{ Options, Gatling } | import java.lang.System.currentTimeMillis | ||
import com.excilys.ebi.gatling.core.util.PathHelper.path2string | import java.util.{ Map => JMap } | ||
|
|
||
import com.excilys.ebi.gatling.app.Gatling | |||
import com.excilys.ebi.gatling.app.CommandLineConstants._ | |||
import com.excilys.ebi.gatling.charts.report.ReportsGenerator | |||
import com.excilys.ebi.gatling.core.config.{ GatlingFiles, GatlingPropertiesBuilder } | |||
import com.excilys.ebi.gatling.core.config.GatlingConfiguration | |||
import com.excilys.ebi.gatling.core.config.GatlingConfiguration.configuration | |||
import com.excilys.ebi.gatling.core.runner.{ Runner, Selection } | |||
import com.excilys.ebi.gatling.core.scenario.configuration.Simulation | |||
import com.excilys.ebi.gatling.core.util.FileHelper.formatToFilename | |||
|
|
||
object Engine extends App { | import grizzled.slf4j.Logging | ||
import scopt.OptionParser | |||
|
|
||
new Gatling(Options( |
|
||
dataFolder = Some(IDEPathHelper.dataFolder), | object Engine extends Logging { | ||
resultsFolder = Some(IDEPathHelper.resultsFolder), |
|
||
requestBodiesFolder = Some(IDEPathHelper.requestBodiesFolder), | /** | ||
simulationBinariesFolder = Some(IDEPathHelper.mavenBinariesDir))).start | * Entry point of Application | ||
* | |||
* @param args Arguments of the main method | |||
*/ | |||
def main(args: Array[String]) { | |||
|
|||
println(IDEPathHelper.requestBodiesFolder.toString) | |||
val arguments = Array("--data-folder" , IDEPathHelper.dataFolder.toString, "--simulations-folder" , IDEPathHelper.mavenSourcesDir.toString , | |||
"--request-bodies-folder" , IDEPathHelper.requestBodiesFolder.toString, "--results-folder" , IDEPathHelper.resultsFolder.toString) | |||
val props = new GatlingPropertiesBuilder | |||
val cliOptsParser = new OptionParser("gatling") { | |||
opt(CLI_NO_REPORTS, CLI_NO_REPORTS_ALIAS, "Runs simulation but does not generate reports", { props.noReports }) | |||
opt(CLI_REPORTS_ONLY, CLI_REPORTS_ONLY_ALIAS, "<directoryName>", "Generates the reports for the simulation in <directoryName>", { v: String => props.reportsOnly(v) }) | |||
opt(CLI_DATA_FOLDER, CLI_DATA_FOLDER_ALIAS, "<directoryPath>", "Uses <directoryPath> as the absolute path of the directory where feeders are stored", { v: String => props.dataDirectory(v) }) | |||
opt(CLI_RESULTS_FOLDER, CLI_RESULTS_FOLDER_ALIAS, "<directoryPath>", "Uses <directoryPath> as the absolute path of the directory where results are stored", { v: String => props.resultsDirectory(v) }) | |||
opt(CLI_REQUEST_BODIES_FOLDER, CLI_REQUEST_BODIES_FOLDER_ALIAS, "<directoryPath>", "Uses <directoryPath> as the absolute path of the directory where request bodies are stored", { v: String => props.requestBodiesDirectory(v) }) | |||
opt(CLI_SIMULATIONS_FOLDER, CLI_SIMULATIONS_FOLDER_ALIAS, "<directoryPath>", "Uses <directoryPath> to discover simulations that could be run", { v: String => props.sourcesDirectory(v) }) | |||
opt(CLI_SIMULATIONS_BINARIES_FOLDER, CLI_SIMULATIONS_BINARIES_FOLDER_ALIAS, "<directoryPath>", "Uses <directoryPath> to discover already compiled simulations", { v: String => props.binariesDirectory(v) }) | |||
opt(CLI_SIMULATION, CLI_SIMULATION_ALIAS, "<className>", "Runs <className> simulation", { v: String => props.clazz(v) }) | |||
opt(CLI_OUTPUT_DIRECTORY_BASE_NAME, CLI_OUTPUT_DIRECTORY_BASE_NAME_ALIAS, "<name>", "Use <name> for the base name of the output directory", { v: String => props.outputDirectoryBaseName(v) }) | |||
} | |||
// if arguments are incorrect, usage message is displayed | |||
if (cliOptsParser.parse(arguments)) | |||
fromMap(props.build) | |||
} | |||
|
|||
def fromMap(props: JMap[String, Any]) { | |||
GatlingConfiguration.setUp(props) | |||
new Gatling().start | |||
} | |||
} | } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.