History and Analytics: average speed from bytes for periods over 24 hours

The aggregate tables (stats_*) keep only bytes, and the queries returned 0 as speed, so the Speed
mode was empty for 7d and 30d. Speed is now the bucket average: bytes * 8 / 1e6 / bucket seconds;
for the current incomplete bucket the duration is min(bucket length, time since its start), at least
1 s. Series are labelled "RX Mbps (avg)" / "TX Mbps (avg)" for ranges over 24h. One test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KC7BXv32Jwj8mY5sKX8u2F
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 14:28:02 +03:00
1 parent e364a40e4b
commit b3466f9c61
17 files changed
+97 -19

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenVPN Controller</title>
<script type="module" crossorigin src="/assets/index-pRvvTpjQ.js"></script>
<script type="module" crossorigin src="/assets/index-BfAhXdi6.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BZ2WYZTa.css">
</head>