-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from mozilla-services/add-load-tests
Import load tests from Reading List
- Loading branch information
Showing
12 changed files
with
404 additions
and
2 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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
SERVER_URL = https://kinto.stage.mozaws.net:443 | ||
VIRTUALENV=virtualenv | ||
VENV := $(shell echo $${VIRTUAL_ENV-.venv}) | ||
PYTHON=$(VENV)/bin/python | ||
|
||
TEST_SUITE = loadtest.TestBasic.test_all | ||
|
||
# Hackety-hack around OSX system python bustage. | ||
# The need for this should go away with a future osx/xcode update. | ||
ARCHFLAGS = -Wno-error=unused-command-line-argument-hard-error-in-future | ||
INSTALL = ARCHFLAGS=$(ARCHFLAGS) $(VENV)/bin/pip install | ||
|
||
.PHONY: install clean bench megabench | ||
|
||
$(PYTHON): | ||
$(VIRTUALENV) $(VENV) | ||
|
||
|
||
# Build virtualenv, to ensure we have all the dependencies. | ||
.env.install: $(PYTHON) | ||
$(INSTALL) git+git://github.com/mozilla-services/loads.git >> loadtest.log && \ | ||
rm loadtest.log || cat loadtest.log | ||
touch $@ | ||
|
||
install: .env.install | ||
|
||
# Clean all the things installed by `make build`. | ||
clean: | ||
rm -rf .venv *.pyc .env.install | ||
|
||
# Run a single test from the venv machine, for sanity-checking. | ||
test: install | ||
$(VENV)/bin/loads-runner --config=./config/test.ini --server-url=$(SERVER_URL) $(TEST_SUITE) | ||
|
||
# Run a bench of 20 concurrent users. | ||
bench: | ||
$(VENV)/bin/loads-runner --config=./config/bench.ini --server-url=$(SERVER_URL) $(TEST_SUITE) | ||
|
||
# Run a much bigger bench, by submitting to broker in AWS. | ||
megabench: | ||
$(VENV)/bin/loads-runner --config=./config/megabench.ini --user-id=$(USER) --server-url=$(SERVER_URL) $(TEST_SUITE) | ||
|
||
smoke: | ||
$(VENV)/bin/loads-runner --config=./config/smoke.ini --user-id=$(USER) --server-url=$(SERVER_URL) $(TEST_SUITE) | ||
|
||
# Purge any currently-running loadtest runs. | ||
purge: | ||
$(VENV)/bin/loads-runner --config=./config/megabench.ini --purge-broker | ||
|
||
attach: | ||
$(VENV)/bin/loads-runner --config=./config/megabench.ini --attach |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[loads] | ||
users = 20 | ||
duration = 600 | ||
no-dns-resolve = true | ||
include_file = loadtest/*.py |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[loads] | ||
users = 20 | ||
duration = 1800 | ||
include_file = loadtest | ||
config/* | ||
python-dep = konfig | ||
agents = 5 | ||
detach = true | ||
observer = irc | ||
ssh = ubuntu@loads.services.mozilla.com | ||
no-dns-resolve = true | ||
broker = tcp://172.31.44.86:7780 |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[loads] | ||
no-dns-resolve = true | ||
include_file = loadtest | ||
config/* | ||
python-dep = konfig | ||
smoke = True | ||
test_dir = . | ||
|
||
# Bearer token on stable.dev.lcip.org kinto@restmail.net | ||
# token = 82ab7abb4bf90ffaa85a3d1fca169824fa14072016298e2c2671a49a96e2ff5d | ||
|
||
# Bearer token on accounts.stage.mozaws.net kinto@restmail.net | ||
token = 05aa9446c83ba39ebf2a4e14477089fd1ff30fd49cce202a5b4d75d0a1ed1cf1 | ||
|
||
# Bearer token on accounts.firefox.com kinto@restmail.net | ||
# token = 78aeadbe1d6fad8f92fb94ebed287db1afee7a06d2c775684e6322e1e787e89a |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[loads] | ||
hits = 100 | ||
users = 3 | ||
no-dns-resolve = true | ||
include_file = loadtest |
Oops, something went wrong.