Completing TrendS documentation for readthedocs

This commit is contained in:
DanB
2024-10-06 17:53:08 +02:00
parent 796b508353
commit dfc1ed0f0b
2 changed files with 114 additions and 10 deletions

View File

@@ -92,7 +92,8 @@ func NewTrendFromProfile(tP *TrendProfile) *Trend {
ID: tP.ID,
RunTimes: make([]time.Time, 0),
Metrics: make(map[time.Time]map[string]*MetricWithTrend),
tPrfl: tP,
tPrfl: tP,
}
}
@@ -100,10 +101,11 @@ func NewTrendFromProfile(tP *TrendProfile) *Trend {
type Trend struct {
tMux sync.RWMutex
Tenant string
ID string
RunTimes []time.Time
Metrics map[time.Time]map[string]*MetricWithTrend
Tenant string
ID string
RunTimes []time.Time
Metrics map[time.Time]map[string]*MetricWithTrend
CompressedMetrics []byte // if populated, Metrics and RunTimes will be emty
// indexes help faster processing
mLast map[string]time.Time // last time a metric was present