constants

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package constants holds time math, config defaults, and statistical thresholds. Anything ending in `Ms` is unix-millisecond integer math (the wire format).

Index

Constants

View Source
const (
	OneSecondMs int64 = 1_000
	OneMinuteMs int64 = 60 * OneSecondMs
	OneHourMs   int64 = 60 * OneMinuteMs
	OneDayMs    int64 = 24 * OneHourMs
	OneWeekMs   int64 = 7 * OneDayMs
)

Time conversions in unix milliseconds.

View Source
const (
	OneMinBucketMs  int64 = OneMinuteMs
	FiveMinBucketMs int64 = 5 * OneMinuteMs
	OneHourBucketMs int64 = OneHourMs
)

Aggregation bucket widths. Changing these invalidates existing buckets.

View Source
const (
	DefaultLookback1MinMs int64 = 6 * OneHourMs
	DefaultLookback5MinMs int64 = OneDayMs
	DefaultLookback1HMs   int64 = OneWeekMs
)

Per-tier lookback windows on each aggregator wakeup.

View Source
const (
	DefaultPingIntervalSec  float64 = 2.5
	DefaultPingTimeoutMs    int     = 2000
	DefaultFlushIntervalSec int     = 60

	DefaultRetentionRawDays  int = 7
	DefaultRetention1MinDays int = 14
	DefaultRetention5MinDays int = 90
)

app_config seed defaults.

View Source
const (
	P50Quantile float64 = 0.5
	P95Quantile float64 = 0.95
	P99Quantile float64 = 0.99

	PercentMultiplier float64 = 100.0
)

Latency quantiles and the 0..1 → 0..100 conversion factor.

View Source
const SafetyMarginMs int64 = 90 * OneSecondMs

SafetyMarginMs delays bucket close past the flush interval (60s) so all samples are durable.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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