aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-07-01 19:04:22 -0500
committerJP Dillingham <jp@dillingham.me>2026-07-01 19:04:22 -0500
commitff2c651aeed76b070969a9ce55b0c170c1ec9fb8 (patch)
tree7fc837ba8c6570c225e54225b898a86816edc162
parentf8537aefc2ca61716305e5f1cfefbbae896b11c5 (diff)
downloadslskd-ff2c651aeed76b070969a9ce55b0c170c1ec9fb8.tar.gz
couple tweaks
-rw-r--r--src/slskd/Telemetry/ReportsService.cs4
-rw-r--r--src/web/src/components/Dashboard/Dashboard.jsx2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Telemetry/ReportsService.cs b/src/slskd/Telemetry/ReportsService.cs
index e0304d2a..adc2febf 100644
--- a/src/slskd/Telemetry/ReportsService.cs
+++ b/src/slskd/Telemetry/ReportsService.cs
@@ -181,8 +181,8 @@ public class ReportsService
StateDescription,
SUM(Size) AS TotalBytes,
COUNT(*) AS Count,
- COUNT(DISTINCT Username) AS Users,
- AVG(AverageSpeed) AS AverageSpeed,
+ COUNT(DISTINCT Username) AS DistinctUsers,
+ CAST(SUM(Size) AS REAL) / NULLIF(SUM(strftime('%s', EndedAt) - strftime('%s', StartedAt)), 0) AS AverageSpeed,
COALESCE(AVG(strftime('%s', StartedAt) - strftime('%s', EnqueuedAt)), 0.0) AS AverageWait,
COALESCE(AVG(strftime('%s', EndedAt) - strftime('%s', StartedAt)), 0.0) AS AverageDuration
FROM Transfers
diff --git a/src/web/src/components/Dashboard/Dashboard.jsx b/src/web/src/components/Dashboard/Dashboard.jsx
index 8043ab0b..302e0f0a 100644
--- a/src/web/src/components/Dashboard/Dashboard.jsx
+++ b/src/web/src/components/Dashboard/Dashboard.jsx
@@ -50,7 +50,7 @@ const Dashboard = ({ server } = {}) => {
start:
range.days != null
? new Date(now - range.days * 86_400_000).toISOString()
- : null,
+ : new Date(0).toISOString(),
};
}, [historyLabel]);