Some cluster parameter tweaks, and change the test code in tests/http to dramatically reduce the amount of data transfer to/from the test master. Also add results of first successful 50k test.

This commit is contained in:
Adam Ierymenko 2015-11-10 11:59:03 -08:00
commit 2854f14966
6 changed files with 54 additions and 43 deletions

View file

@ -30,12 +30,21 @@ app.post('/:agentId',function(req,res) {
var resultData = null;
try {
resultData = JSON.parse(req.rawBody);
console.log(Date.now()+','+resultData.source+','+resultData.target+','+resultData.time+','+resultData.bytes+','+resultData.timedOut+',"'+((resultData.error) ? resultData.error : '')+'"');
console.log(Date.now().toString()+','+resultData.source+','+resultData.target+','+resultData.time+','+resultData.bytes+','+resultData.timedOut+',"'+((resultData.error) ? resultData.error : '')+'"');
} catch (e) {}
}
knownAgents[agentId] = Date.now();
return res.status(200).send(JSON.stringify(Object.keys(knownAgents)));
var thisUpdate = null;
if (!(agentId in knownAgents)) {
thisUpdate = Object.keys(knownAgents);
for(var id in knownAgents)
knownAgents[id].push(agentId);
knownAgents[agentId] = [];
} else {
thisUpdate = knownAgents[agentId];
knownAgents[agentId] = [];
}
return res.status(200).send(JSON.stringify(thisUpdate));
});
var expressServer = app.listen(SERVER_PORT,function () {