It does compute a hashring for 100 nodes as far as I can understand. Would be nice to make it faster, we probably do not need to compute the ring for 100 nodes?
|mediawiki/core : REL1_33||Reduce HashRing test load to avoid several seconds of CPU|
|mediawiki/core : REL1_32||Reduce HashRing test load to avoid several seconds of CPU|
|mediawiki/core : master||Reduce HashRing test load to avoid several seconds of CPU|
@aaron indeed the $ketama_test( 1e5 ) is the culprit and lowering it down to 10000 get it down to half a second. Is there any need to verify it against a larger number? Given the test already ran it for 100 entry, I would guess it could result that output, do the md5sum and compare against the expected md5sum from .c code?
Took 0.93 sec. * testHashRingKetamaMode 0.88 s Passed <= * testHashRingRatios with data set #0 28 ms Passed * testHashRingRatios2 with data set #0 5 ms Passed
Took 61 ms. * testHashRingRatios with data set #0 27 ms Passed * testHashRingKetamaMode 11 ms Passed <= * testHashRingRatios2 with data set #0 5 ms Passed