Skip to content

Commit

Permalink
Add overhead compenstation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketok4321 committed Sep 5, 2023
1 parent 9728d46 commit 64e0917
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/speedtest_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
DURATION = 15
DL_STREAMS = 6
UP_STREAMS = 3
OVERHEAD_COMPENSATION = 1.06

class SpeedtestWorker(threading.Thread):
def __init__(self, win, server):
Expand Down Expand Up @@ -73,7 +74,7 @@ def update(self, gauge, part_two):
view = self.win.test_view

current_duration = time.time() - self.start_time
value = self.total[0] / current_duration
value = self.total[0] * OVERHEAD_COMPENSATION / current_duration

if current_duration > 1:
view.update_gauge(gauge, value)
Expand Down

0 comments on commit 64e0917

Please sign in to comment.