18 from ..metric
import Metric
19 from .....statistics
import getUploadSpeed
22 class MetricUploadSpeed(Metric):
24 def __init__(self) -> None:
25 self.previousValue = getUploadSpeed()
27 def extract(self) -> float:
28 currentValue = getUploadSpeed()
29 diff = currentValue - self.previousValue
31 self.previousValue = currentValue