mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
add stuff for how to do load testing
This commit is contained in:
parent
9790598381
commit
bbaa6bb7d2
3 changed files with 111 additions and 0 deletions
20
bin/loadTesting/loader.js
Normal file
20
bin/loadTesting/loader.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
var page = new WebPage(),
|
||||
t, address;
|
||||
|
||||
if (phantom.args.length === 0) {
|
||||
console.log('Usage: loader.js <some URL>');
|
||||
phantom.exit();
|
||||
} else {
|
||||
t = Date.now();
|
||||
address = phantom.args[0];
|
||||
|
||||
var page = new WebPage();
|
||||
page.onResourceRequested = function (request) {
|
||||
console.log('Request ' + JSON.stringify(request, undefined, 4));
|
||||
};
|
||||
page.onResourceReceived = function (response) {
|
||||
console.log('Receive ' + JSON.stringify(response, undefined, 4));
|
||||
};
|
||||
page.open(address);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue