Documentation
¶
Index ¶
- Constants
- func NewHeatmapReportIterator(reports []*queryv1.HeatmapReport) iter.Iterator[HeatmapValue]
- func RangeHeatmap(reports []*queryv1.HeatmapReport, start, end, step int64, ...) []*typesv1.HeatmapSeries
- func TopSeries(s []*typesv1.HeatmapSeries, k int) []*typesv1.HeatmapSeries
- type Builder
- type HeatmapSeriesIterator
- type HeatmapValue
- type Merger
Constants ¶
const (
// DefaultYAxisBuckets is the default number of Y-axis buckets
DefaultYAxisBuckets = 20
)
Variables ¶
This section is empty.
Functions ¶
func NewHeatmapReportIterator ¶
func NewHeatmapReportIterator(reports []*queryv1.HeatmapReport) iter.Iterator[HeatmapValue]
NewHeatmapReportIterator creates an iterator from multiple heatmap reports
func RangeHeatmap ¶
func RangeHeatmap( reports []*queryv1.HeatmapReport, start, end, step int64, exemplarType typesv1.ExemplarType, ) []*typesv1.HeatmapSeries
RangeHeatmap buckets heatmap points into time/value buckets for visualization Each input series produces a separate output series with labels preserved Y-axis buckets are calculated based on global min/max across all series
func TopSeries ¶
func TopSeries(s []*typesv1.HeatmapSeries, k int) []*typesv1.HeatmapSeries
TopSeries returns the top k heatmap series by sum of counts.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) Build ¶
func (h *Builder) Build(report *queryv1.HeatmapReport) *queryv1.HeatmapReport
type HeatmapSeriesIterator ¶
type HeatmapSeriesIterator struct {
// contains filtered or unexported fields
}
HeatmapSeriesIterator iterates over points in a heatmap series
func NewHeatmapSeriesIterator ¶
func NewHeatmapSeriesIterator(points []*queryv1.HeatmapPoint) *HeatmapSeriesIterator
NewHeatmapSeriesIterator creates a new iterator for a heatmap series
func (*HeatmapSeriesIterator) At ¶
func (it *HeatmapSeriesIterator) At() HeatmapValue
At returns the current heatmap value
func (*HeatmapSeriesIterator) Close ¶
func (it *HeatmapSeriesIterator) Close() error
Close closes the iterator
func (*HeatmapSeriesIterator) Err ¶
func (it *HeatmapSeriesIterator) Err() error
Err returns any error encountered during iteration
func (*HeatmapSeriesIterator) Next ¶
func (it *HeatmapSeriesIterator) Next() bool
Next advances the iterator to the next point
type HeatmapValue ¶
type HeatmapValue struct {
Timestamp int64
Value int64
ProfileId int64
SpanId uint64
AttributeRefs []int64
}
HeatmapValue represents a single heatmap point value
type Merger ¶
type Merger struct {
// contains filtered or unexported fields
}
func NewMerger ¶
NewMerger creates a new heatmap merger. If sum is set, points with matching timestamps, profileIDs, and spanIDs have their values summed.
func (*Merger) Build ¶
func (m *Merger) Build() *queryv1.HeatmapReport
Build returns the merged heatmap report
func (*Merger) MergeHeatmap ¶
func (m *Merger) MergeHeatmap(report *queryv1.HeatmapReport)
MergeHeatmap adds a heatmap report to the merger