Last active
April 11, 2016 22:28
-
-
Save larsvegas/a920660b2a03cf015228e314ebee8ba6 to your computer and use it in GitHub Desktop.
2016-04-AWS-FeatureRoll-StormForgerTestCase-beanstalk.js find more information at: http://bit.ly/awsfeatureroll
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
// //////////////////////////////////////// | |
// 1. Settings | |
// //////////////////////////////////////// | |
// Target | |
definition.setTarget("http://awsfeatureroll.elasticbeanstalk.com"); | |
// Arrival Phases | |
definition.setArrivalPhases([ | |
{ duration: 1 * 60, rate: 5}, | |
{ duration: 1 * 60, rate: 10}, | |
{ duration: 1 * 60, rate: 20}, | |
{ duration: 1 * 60, rate: 30}, | |
{ duration: 1 * 60, rate: 40}, | |
{ duration: 1 * 60, rate: 50} | |
]); | |
// TestCase Options | |
definition.setTestOptions({ | |
cluster: { | |
sizing: "small" | |
} | |
}); | |
// Datasources | |
definition.setDataSources({ | |
day: { | |
type: "random_number", | |
range: [1, 31], | |
}, | |
}); | |
// Vars | |
var useGzip = true; | |
var startDate = "2015-07-"; | |
var endDate = "2015-12-"; | |
// //////////////////////////////////////// | |
// 2. Sessions | |
// //////////////////////////////////////// | |
// 80% of all clients request the feature list | |
definition.session("features", 80, function(session) { | |
var startDay = session.pick("day"); | |
var endDay = session.pick("day"); | |
session.get("/api/feature?startdate=" + startDate + startDay + "&enddate=" + endDate + endDay, { | |
tag: "features", | |
gzip: useGzip | |
}); | |
}); | |
// 20% of all clients request a RevealJS Slide Deck | |
definition.session("slides", 20, function(session) { | |
var startDay = session.pick("day"); | |
var endDay = session.pick("day"); | |
session.get("/api/slides?startdate=" + startDate + "&enddate=" + endDate, { | |
tag: "slides", | |
gzip: useGzip | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment