docs: unify header to import path for package docs

This commit is contained in:
yusing
2026-02-18 03:25:32 +08:00
parent 7baf0b6fe5
commit 20695c52e8
47 changed files with 56 additions and 70 deletions

View File

@@ -1,4 +1,4 @@
# Metrics Package
# internal/metrics
System monitoring and metrics collection for GoDoxy with time-series storage and REST/WebSocket APIs.

View File

@@ -1,4 +1,4 @@
# Period Metrics
# internal/metrics/period
Provides time-bucketed metrics storage with configurable periods, enabling historical data aggregation and real-time streaming.
@@ -453,7 +453,7 @@ for {
- O(1) add to circular buffer
- O(1) get (returns slice view)
- O(n) serialization where n = total entries
- Memory: O(5 * 100 * sizeof(T)) = fixed overhead
- Memory: O(5 _ 100 _ sizeof(T)) = fixed overhead
- JSON load/save: O(n) where n = total entries
## Testing Notes

View File

@@ -1,4 +1,4 @@
# System Info
# internal/metrics/systeminfo
Collects and aggregates system metrics including CPU, memory, disk, network, and sensor data with configurable aggregation modes.
@@ -367,7 +367,7 @@ curl "http://localhost:8080/api/metrics/system?period=1h&aggregate=disks_read_sp
```javascript
const ws = new WebSocket(
"ws://localhost:8080/api/metrics/system?period=1m&interval=5s&aggregate=cpu_average"
"ws://localhost:8080/api/metrics/system?period=1m&interval=5s&aggregate=cpu_average",
);
ws.onmessage = (event) => {

View File

@@ -1,4 +1,4 @@
# Uptime
# internal/metrics/uptime
Tracks and aggregates route health status over time, providing uptime/downtime statistics and latency metrics.