Labs/Weave/GrinderTesting
Load Testing with Grinder
Each individual test simulates a user "session" - essentially what happens the majority of the time when the client wakes up and interacts with the server. It consists of the following steps:
- Issue a query to get the collections summary
- Loop through ['bookmarks', 'forms', 'passwords', 'history', 'prefs'] and, for each randomly determine whether the client should do a GET on the collection
- Loop through ['bookmarks', 'forms', 'passwords', 'history', 'prefs'] and, for each randomly determine whether the client should do a POST on the collection with a random-length payload and a random integer id. (Using an integer id keeps collection sizes sane - as they get bigger, they'll overwrite old ones)
We aren't currently simulating tabs, as those go into memcache, and the current model would fill memcache.
It is possible to, by controlling the number of sessions per second, to simulate user load. This is done by the following calculation:
(cell users * 288) + (dual-broswer users * 24) + (solo-browser users) / 86400
Properly simulating this will require knowing the relative percentages of the three types of users. At present, the relative frequency of these users adds up to 35 sessions/second for a million users.
In the aggregate, the percentage chances for the sessions are as follows:
info/collections GET: 100%
metaglobal GET: 60%
collection GETs:
0: 70% 1: 10% 2: 10% all: 10%
collection POSTs:
0: 70% 1: 10% 2: 10% 3: 10%
collection DELETES:
0: 99% 1: 1%