add the stats endpoint
This commit is contained in:
@@ -16,4 +16,10 @@ public sealed class UploadTimes
|
||||
|
||||
_uploadHistories[deviceId] = (history.TotalUploadTime + uploadTimeNanos, history.UploadCounts + 1);
|
||||
}
|
||||
|
||||
public BigInteger AverageUploadTimeNanoseconds(DeviceId deviceId)
|
||||
{
|
||||
if (!_uploadHistories.TryGetValue(deviceId, out var history)) return BigInteger.Zero;
|
||||
return history.TotalUploadTime / history.UploadCounts;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user