Documentation
¶
Overview ¶
Package timeline records bounded, run-aligned measurements and derives transparent correlation signals. It never claims that a suspect caused an outcome; every row carries the exact window, metric, formula and limitation that produced it.
Index ¶
- Constants
- type Analysis
- type Bucket
- type Collector
- func (c *Collector) HTTPCancel(at time.Time, token any)
- func (c *Collector) HTTPFinish(at time.Time, token any, key string, duration time.Duration, failed bool)
- func (c *Collector) HTTPStart(at time.Time) any
- func (c *Collector) ObserveSQL(at time.Time, key string, duration time.Duration, failed bool)
- func (c *Collector) SQLCancel(time.Time, any)
- func (c *Collector) SQLFinish(at time.Time, token any, key string, duration time.Duration, failed bool)
- func (c *Collector) SQLStart(at time.Time) any
- func (c *Collector) Sample(sample ResourceSample)
- func (c *Collector) Section(runID string, epoch uint64) (Section, bool)
- func (c *Collector) Start(start RunStart) bool
- func (c *Collector) Terminate(terminal RunTermination)
- func (c *Collector) Tick(at time.Time)
- type Config
- type EvidenceRef
- type HostBucket
- type HostPoint
- type Operation
- type Outcome
- type Phase
- type PoolBucket
- type PoolPoint
- type ProcessBucket
- type ProcessPoint
- type ResourceSample
- type Rule
- type RunStart
- type RunTermination
- type Section
- type Suspect
Constants ¶
const ( SchemaV1 = "isutools.timeline/v1" DefaultInterval = time.Second DefaultMaxBuckets = 180 DefaultMaxOperations = 32 MaxSerializedBytes = 2 << 20 ReasonInsufficientBuckets = "insufficient-time-buckets" PhaseTrafficGrowth = "traffic-growth" PhaseTailEscalation = "tail-latency-escalation" PhaseSaturation = "saturation" PhaseErrorOnset = "error-onset" PhaseRecovery = "recovery" PhaseBottleneckMigration = "bottleneck-migration" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analysis ¶
type Bucket ¶
type Bucket struct {
Index int `json:"index"`
Start time.Time `json:"start"`
End time.Time `json:"end"`
HTTPInFlightMax int64 `json:"http_in_flight_max"`
HTTP []Operation `json:"http,omitempty"`
SQL []Operation `json:"sql,omitempty"`
DBPools []PoolBucket `json:"dbpool,omitempty"`
Process *ProcessBucket `json:"process,omitempty"`
Host *HostBucket `json:"host,omitempty"`
}
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func (*Collector) HTTPFinish ¶
func (*Collector) ObserveSQL ¶
func (*Collector) Sample ¶
func (c *Collector) Sample(sample ResourceSample)
func (*Collector) Start ¶
Start opens a run exactly once. It returns true only when the caller owns a newly active run and may start its sampler. Lifecycle delivery can race in either direction, so a terminal event received first is consumed here and returns false after publishing the completed section.
func (*Collector) Terminate ¶
func (c *Collector) Terminate(terminal RunTermination)
type EvidenceRef ¶
type EvidenceRef struct {
BucketIndex int `json:"bucket_index"`
WindowStart time.Time `json:"window_start"`
WindowEnd time.Time `json:"window_end"`
Signal string `json:"signal"`
Metric string `json:"metric"`
Value float64 `json:"value"`
Formula string `json:"formula"`
Limitation string `json:"limitation"`
}
type HostBucket ¶
type Outcome ¶
type Outcome struct {
Score string `json:"score,omitempty"`
Pass *bool `json:"pass,omitempty"`
Validity string `json:"measurement_validity,omitempty"`
}
Outcome records only values supplied by the benchmark integration. Pass is a pointer so "not supplied" remains distinct from a failing result.
type PoolBucket ¶
type ProcessBucket ¶
type ProcessPoint ¶
type ResourceSample ¶
type ResourceSample struct {
At time.Time
Pools []PoolPoint
Process *ProcessPoint
Host *HostPoint
}
type RunTermination ¶
type Section ¶
type Section struct {
Schema string `json:"schema"`
RunID string `json:"run_id"`
Epoch uint64 `json:"epoch"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at,omitzero"`
IntervalNs int64 `json:"interval_ns"`
MaxBuckets int `json:"max_buckets"`
MaxOperations int `json:"max_operations"`
Truncated bool `json:"truncated,omitempty"`
OverflowedEvents uint64 `json:"overflowed_events,omitempty"`
Validity string `json:"validity,omitempty"`
StopReason string `json:"stop_reason,omitempty"`
Outcome Outcome `json:"outcome,omitzero"`
Buckets []Bucket `json:"buckets"`
Analysis Analysis `json:"analysis"`
}