Correct average latency calculation in best server determination.

Reverts part of commit c1b9a0d. I guess some exploratory or debugging edits
made it into the commit.

Three samples are run, summed, and divided by six. It should be three.

As a result, the latency results were halved. The "best" server was still
chosen but the ping time displayed was half of the real average result.
This commit is contained in:
Nelson Chen 2015-11-15 13:35:04 -08:00
parent 7b09d8759f
commit 54bcf83dad
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,7 @@ def getBestServer(servers):
else:
cum.append(3600)
h.close()
avg = round((sum(cum) / 6) * 1000, 3)
avg = round((sum(cum) / 3) * 1000, 3)
results[avg] = server
fastest = sorted(results.keys())[0]
best = results[fastest]