If the flag --queueingtest exists, then the client will check for queueing and exit. Exits 0 with no queue, and 1 with queueing.
Since the server always send a SRV_QUEUE message of some sort, the logic here tries to determine not just when a SRV_QUEUE message was received, but also when one was received and the wait time for the test to start is non-zero.
I've minimally tested that this work on mlab1.iad1t by executing this on my local machine, then running the ndt_client.js with this change:
$ for i in $(seq 1 100); do ndt mlab1v4.iad1t & done
That is enough to throw the NDT server into a queueing with non-zero wait times, and for the change in this script to pick it up correctly.
If the flag
--queueingtest
exists, then the client will check for queueing and exit. Exits 0 with no queue, and 1 with queueing.Since the server always send a SRV_QUEUE message of some sort, the logic here tries to determine not just when a SRV_QUEUE message was received, but also when one was received and the wait time for the test to start is non-zero.
I've minimally tested that this work on mlab1.iad1t by executing this on my local machine, then running the ndt_client.js with this change:
$ for i in $(seq 1 100); do ndt mlab1v4.iad1t & done
That is enough to throw the NDT server into a queueing with non-zero wait times, and for the change in this script to pick it up correctly.
This change is