or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
golangpkg:golang/github.com/prometheus/client_model@v0.6.2
tile.json

tessl/golang-github-com-prometheus--client-model

tessl install tessl/golang-github-com-prometheus--client-model@0.6.1

Data 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%

task.mdevals/scenario-1/

Float-Precise Histogram Encoder

Produce a serialized histogram metric payload that honors fractional overrides for overall and per-bucket counts so the encoded data exposes the higher-precision values.

Capabilities

Sample total override

  • When both an integer total and a fractional override are provided, the encoded histogram exposes the fractional total instead of the integer one, while retaining the provided sample sum and bucket layout. @test

Bucket override precedence

  • For any bucket that includes both an integer cumulative count and a fractional override, the encoded bucket exposes the fractional count while buckets without overrides keep their integer totals. @test

Mixed monotonic buckets

  • When combining fractional and integer bucket counts, the encoded cumulative counts remain non-decreasing in order of upper bounds and the final bucket aligns with the chosen total count. @test

Integer fallback

  • If no fractional overrides are supplied, the encoded histogram uses the integer totals unchanged for the overall sample count and every bucket. @test

Implementation

@generates

API

// Bucket-level input with optional fractional cumulative count override.
type BucketInput struct {
	UpperBound float64
	CumulativeCount uint64
	CumulativeCountOverride *float64
}

// Histogram input supporting fractional overrides for totals and buckets.
type HistogramInput struct {
	Name string
	Help string
	Unit string
	Buckets []BucketInput
	SampleCount uint64
	SampleCountOverride *float64
	SampleSum float64
	TimestampMs int64
}

// EncodeHistogram produces a serialized histogram metric using the provided inputs,
// preferring fractional overrides for totals and bucket counts when present.
func EncodeHistogram(input HistogramInput) ([]byte, error)

Dependencies { .dependencies }

Prometheus client model { .dependency }

Provides metric protobuf structures needed to encode histograms with fractional count overrides. @satisfied-by