add the stats endpoint

This commit is contained in:
2026-08-06 13:40:07 -05:00
parent 9f94290439
commit 6e88380fea
2 changed files with 23 additions and 1 deletions
+6
View File
@@ -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;
}
}