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