-
Notifications
You must be signed in to change notification settings - Fork 34
Benchmark
Take 5 minutes to study the source code for the swarm for benchmarking here
In an adaptor start "BenchMark.js" benchmark:
startSwarm("BenchMark.js","ctor",48000);
Or in a SwarmClient (look in test/BenchmarkTest.js for code):
client.startSwarm("BenchMark.js","ctor",48000);
Parameters: 48000 is the number of phases that will be started in parallel in 3 nodes (adaptors) and the end, the "printResults" phase will print the number of phases finished per second.
**Benchmark results: 40101 phases per second! Time spent: 1.197seconds **
In above example, in 1.1 seconds, 48000 phases got executed.
We noticed that having parallel execution in more nodes it is increasing the number of phases per second but Redis channels is obviously adding limits (bottleneck). In future,if we will find Redis limits significant for our use cases or at community requests, we plan to replace Redis's pub/sub channels with faster, distributed message queues or even with UDP communication)