This file contains hidden or 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
package performance.simulations.scenarios | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import performance.simulations.lib.JenkinsParam._ | |
import performance.simulations.lib.RandomFeeder._ | |
import performance.simulations.lib.SharedHeaders._ | |
/** | |
* Created by nwhit8 on 9/21/15. |
This file contains hidden or 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
object Settings { | |
final val Host = "host" | |
final val Protocol = "protocol" | |
object User { | |
final val Name = "username" | |
final val Password = "password" | |
} | |
object Subject { |
This file contains hidden or 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
package sensorData | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import io.gatling.jdbc.Predef._ // maybe not needed? | |
import scala.concurrent.duration._ | |
import com.redis._ | |
import io.gatling.redis.feeder._ |
This file contains hidden or 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
for (var i =1; i < 21; i++) { | |
if( i%3 === 0 && i%5 === 0 ) { | |
console.log("FizzBuzz"); | |
} else if ( i%5 === 0 ) { | |
console.log("Buzz"); | |
} else if (i%3 === 0 ) { | |
console.log("Fizz"); | |
} else { | |
console.log(i); | |
} |
This file contains hidden or 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
/* | |
Write a program that prints out the numbers 1 to 100 (inclusive). | |
If the number is divisible by 3, print Crackle instead of the number. | |
If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, | |
print CracklePop. You can use any language. | |
*/ | |
/// any number x where x % y is divisible by that number. We'll use that fact to match boolean patterns in Scala. | |
//// In Scala RePL, copy-paste the function first. Then use the function in a second call from the REPL. | |
def listEval( number: Int ): String = (number % 3, number % 5 ) match { |
This file contains hidden or 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
val httpProtocol = http.baseURL("http://localhost:8000") | |
case class TestSetup(repeat: Int, users: InjectionStep, label: String) // <-- config holder | |
val sequentialUserTest = TestSetup(repeat = 100, atOnce(1 user), "sequential 1 user") | |
val oneUserPer4sTest = TestSetup(repeat = 2, constantRate(0.25 userPerSec).during(5 minutes), "1 usr/4s, 2 req / user") | |
val threeCentIn5Mins = TestSetup(repeat = 5, ramp(300).over(5 minute), "300 usr w/ 5 req in 5 mins") | |
val testSetUp = sequentialUserTest // <-- config selection (could be also done at runtime) | |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<meta name="description" content="[add your bin description]" /> | |
<meta charset=utf-8 /> | |
<title>Decimalizer c.2013 - Nadine Whitfield</title> | |
</head> | |
<body> |
NewerOlder