mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 13:24:09 -07:00
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:
parent
4328c6c3bc
commit
2854f14966
6 changed files with 54 additions and 43 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue