tessl install tessl/golang-github-com-prometheus--client-model@0.6.1Data model artifacts for Prometheus
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.13x
Baseline
Agent success rate without this tile
82%
Builds a serialized native histogram payload with configurable positive and negative bucket spans, supporting either delta-based or absolute bucket populations.
[{offset: -3, length: 2}], and positive spans [{offset: 0, length: 3}] yields a payload whose span descriptors match the provided offsets/lengths on both sides, aligns bucket slots to the provided spans, and preserves the schema and timestamp in the encoded result. @testUseDelta true and bucket deltas negative=[1, 2], positive=[3, 1], the payload encodes bucket populations using the delta representation for each sign, leaves absolute-count fields empty, and sets the total sample count to the sum of zero bucket plus the provided deltas in span order. @testUseDelta false, zero count 0.25, and bucket populations negative=[1.5], positive=[2.0, 0.5], the payload encodes absolute bucket counts (including fractional values) for both signs, leaves delta fields empty, and sets the total sample count to the sum of zero bucket plus the provided absolute counts. @test@generates
type BucketSpan struct {
Offset int32
Length int32
}
type BucketPopulation struct {
Negative []float64
Positive []float64
UseDelta bool
}
type NativeHistogramSpec struct {
Schema int32
ZeroCount float64
NegativeSpans []BucketSpan
PositiveSpans []BucketSpan
Buckets BucketPopulation
TimestampMs int64
}
// BuildNativeHistogram constructs a native histogram payload using the provided spans and bucket populations.
// When UseDelta is true, bucket values represent per-bucket deltas; otherwise they are absolute counts that may include fractional values.
// The returned bytes must encode the histogram in the dependency's native histogram format, selecting delta or absolute bucket representation based on UseDelta.
func BuildNativeHistogram(spec NativeHistogramSpec) ([]byte, error)Defines the native histogram metric schema used for serialization. @satisfied-by