Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uniformize env and configuration with openpaas-gatling #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ In some cases you could want to specify target hostname per protocol, the follow
* `IMAP_SERVER_HOSTNAME` which is set to `TARGET_HOSTNAME` by default
* `WEBADMIN_SERVER_HOSTNAME` which is set to `TARGET_HOSTNAME` by default

You can also customize the sizing of the scenarios:
* `INJECT_DURATION` is the ramp up time, set to `10` seconds by default
* `SCENARIO_DURATION` is the effective scenario duration, set to `10` seconds by default
* `USER_COUNT` is the number of users, set to `100` by default
* `RANDOMLY_SENT_MAILS` is the numbers of emails sent by user during the provisioning, `10` by default
* `NUMBER_OF_MAILBOXES` is the numbers of mailboxes created during the provisioning, `10` by default
* `NUMBER_OF_MESSAGES` is the numbers of messages created per mailbox during the provisioning, `20` by default

You can run all the simulations via sbt :

.bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ object Configuration {
val WEBADMIN_PROTOCOL = Properties.envOrElse("WEBADMIN_PROTOCOL", "http")
val BaseJamesWebAdministrationUrl = new URL(s"$WEBADMIN_PROTOCOL://$WebadminServerHostName:$WEBADMIN_PORT")

val DURATION_PROPERTY = Properties.envOrNone("DURATION") match {
case Some(duration) => Some(duration.toInt minutes)
case _ => None
}

val ScenarioDuration = DURATION_PROPERTY.getOrElse(1 hour)
val InjectionDuration = DURATION_PROPERTY.getOrElse(1 hour)
val UserCount = 100
val RandomlySentMails = 10
val NumberOfMailboxes = 10
val NumberOfMessages = 20
val InjectDuration = Properties.envOrElse("INJECT_DURATION", "10").toInt seconds
val ScenarioDuration = Properties.envOrElse("SCENARIO_DURATION", "10").toInt seconds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would potentially need to be synced with the bench before being merged I think? as we have a duration injected to simulate a warmup

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And likely the stress file test in james too


val UserCount = Properties.envOrElse("USER_COUNT", "100").toInt
val RandomlySentMails = Properties.envOrElse("RANDOMLY_SENT_MAILS", "10").toInt
val NumberOfMailboxes = Properties.envOrElse("NUMBER_OF_MAILBOXES", "10").toInt
val NumberOfMessages = Properties.envOrElse("NUMBER_OF_MESSAGES", "20").toInt

}