analytics

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MonitorMetrics

type MonitorMetrics struct {
	MonitorID      int64   `json:"monitor_id"`
	UptimePct      float64 `json:"uptime_pct"`
	P50            float64 `json:"p50"`
	P95            float64 `json:"p95"`
	P99            float64 `json:"p99"`
	TotalChecks    int64   `json:"total_checks"`
	UpChecks       int64   `json:"up_checks"`
	DownChecks     int64   `json:"down_checks"`
	DegradedChecks int64   `json:"degraded_checks"`
}

MonitorMetrics holds computed metrics for a monitor.

func ComputeMetrics

func ComputeMetrics(ctx context.Context, store storage.Store, monitorID int64, from, to time.Time) (*MonitorMetrics, error)

ComputeMetrics calculates metrics for a monitor over a time range.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL