Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/common
/ functions
Functions
539 in github.com/prometheus/common
⨍
Functions
539
◇
Types & classes
97
↓ 1 callers
Function
writeLabelPairs
writeLabelPairs converts a slice of LabelPair proto messages plus the explicitly given additional label pair into text formatted as required by the te
expfmt/text_create.go:340
↓ 1 callers
Function
writeOpenMetricsSample
writeOpenMetricsSample writes a single sample in OpenMetrics text format to w, given the metric name, the metric proto message itself, optionally an a
expfmt/openmetrics_create.go:298
↓ 1 callers
Function
writeSample
writeSample writes a single sample in text format to w, given the metric name, the metric proto message itself, optionally an additional label name wi
expfmt/text_create.go:276
↓ 1 callers
Function
writeUint
writeUint is like writeInt just for uint64.
expfmt/openmetrics_create.go:521
Function
AddFlags
AddFlags adds the flags used by this package to the Kingpin application. To use the default Kingpin application, call AddFlags(kingpin.CommandLine)
promlog/flag/flag.go:40
Method
Before
Before compares the metrics' underlying label sets.
model/metric.go:38
Method
Before
Before compares the metrics, using the following criteria: If m has fewer labels than o, it is before o. If it has more, it is not. If the number of
model/labelset.go:72
Function
BenchmarkCreate
(b *testing.B)
expfmt/text_create_test.go:359
Function
BenchmarkCreateBuildInfo
(b *testing.B)
expfmt/text_create_test.go:459
Function
BenchmarkDiscriminatorHTTPHeader
(b *testing.B)
expfmt/decode_test.go:425
Function
BenchmarkEmptyLabelSignature
(b *testing.B)
model/signature_test.go:261
Function
BenchmarkJSONMarshallingSampleHistogramPairMatrix
(b *testing.B)
model/value_histogram_test.go:750
Function
BenchmarkJSONMarshallingSamplePairMatrix
(b *testing.B)
model/value_float_test.go:300
Function
BenchmarkLabelNames
(b *testing.B)
model/labels_test.go:51
Function
BenchmarkLabelToSignatureDouble
(b *testing.B)
model/signature_test.go:205
Function
BenchmarkLabelToSignatureScalar
(b *testing.B)
model/signature_test.go:197
Function
BenchmarkLabelToSignatureSingle
(b *testing.B)
model/signature_test.go:201
Function
BenchmarkLabelToSignatureTriple
(b *testing.B)
model/signature_test.go:209
Function
BenchmarkLabelValues
(b *testing.B)
model/labels_test.go:87
Function
BenchmarkMetric
(b *testing.B)
model/metric_test.go:79
Function
BenchmarkMetricToFastFingerprintDouble
(b *testing.B)
model/signature_test.go:253
Function
BenchmarkMetricToFastFingerprintScalar
(b *testing.B)
model/signature_test.go:245
Function
BenchmarkMetricToFastFingerprintSingle
(b *testing.B)
model/signature_test.go:249
Function
BenchmarkMetricToFastFingerprintTriple
(b *testing.B)
model/signature_test.go:257
Function
BenchmarkMetricToFastFingerprintTripleConc1
(b *testing.B)
model/signature_test.go:311
Function
BenchmarkMetricToFastFingerprintTripleConc2
(b *testing.B)
model/signature_test.go:315
Function
BenchmarkMetricToFastFingerprintTripleConc4
(b *testing.B)
model/signature_test.go:319
Function
BenchmarkMetricToFastFingerprintTripleConc8
(b *testing.B)
model/signature_test.go:323
Function
BenchmarkMetricToFingerprintDouble
(b *testing.B)
model/signature_test.go:229
Function
BenchmarkMetricToFingerprintScalar
(b *testing.B)
model/signature_test.go:221
Function
BenchmarkMetricToFingerprintSingle
(b *testing.B)
model/signature_test.go:225
Function
BenchmarkMetricToFingerprintTriple
(b *testing.B)
model/signature_test.go:233
Function
BenchmarkOpenMetricsCreate
(b *testing.B)
expfmt/openmetrics_create_test.go:446
Function
BenchmarkParseDuration
(b *testing.B)
model/time_test.go:381
Function
BenchmarkParseError
(b *testing.B)
expfmt/text_parse_test.go:665
Function
BenchmarkParseProto
BenchmarkParseProto benchmarks the parsing of a protobuf-format scrape into metric family DTOs. Note that this does not build a map of metric families
expfmt/bench_test.go:92
Function
BenchmarkParseProtoGzip
BenchmarkParseProtoGzip is like BenchmarkParseProto above, but parses gzipped protobuf format.
expfmt/bench_test.go:120
Function
BenchmarkParseProtoMap
BenchmarkParseProtoMap is like BenchmarkParseProto but DOES put the parsed metric family DTOs into a map. This is not happening during Prometheus inge
expfmt/bench_test.go:154
Function
BenchmarkParseText
Benchmarks to show how much penalty text format parsing actually inflicts. Example results on Linux 3.13.0, Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
expfmt/bench_test.go:50
Function
BenchmarkParseTextGzip
BenchmarkParseTextGzip benchmarks the parsing of a gzipped text-format scrape into metric family DTOs.
expfmt/bench_test.go:67
Function
BenchmarkTextParse
(b *testing.B)
expfmt/text_parse_test.go:425
Function
BuildContext
BuildContext returns goVersion, platform, buildUser and buildDate information.
version/info.go:101
Method
Close
Close implements the fs.File interface.
assets/embed_gzip.go:95
Method
Close
()
expfmt/encode.go:54
Method
CloseIdleConnections
()
config/http_config.go:610
Method
CloseIdleConnections
()
config/http_config.go:644
Method
CloseIdleConnections
()
config/http_config.go:693
Method
CloseIdleConnections
()
config/http_config.go:803
Method
CloseIdleConnections
()
config/http_config.go:1182
Method
Decode
Decode implements the Decoder interface.
expfmt/decode.go:89
Method
Decode
Decode implements the Decoder interface.
expfmt/decode.go:126
Method
Encode
(v *dto.MetricFamily)
expfmt/encode.go:50
Method
Equal
Equal compares two sets of samples and returns true if they are equal.
model/value.go:161
Method
Equal
Equal compares two sets of samples and returns true if they are equal.
model/value.go:332
Method
Equal
Equal returns true if the value of v and o is equal or if both are NaN. Note that v==o is false if both are NaN. If you want the conventional float be
model/value_float.go:55
Method
Equal
Equal returns true if this SamplePair and o have equal Values and equal Timestamps. The semantics of Value equality is defined by SampleValue.Equal.
model/value_float.go:92
Method
Equal
Equal compares the metrics.
model/metric.go:33
Method
Equal
Equal returns true iff both label sets have exactly the same key/value pairs.
model/labelset.go:45
Method
Equal
(o HistogramBuckets)
model/value_histogram.go:109
Method
Equal
(o *SampleHistogram)
model/value_histogram.go:132
Method
FastFingerprint
FastFingerprint returns the LabelSet's Fingerprint calculated by a faster hashing algorithm, which is, however, more susceptible to hash collisions.
model/labelset.go:149
Function
FileServe
FileServe returns a new http.HandlerFunc that serves files from dir. Using routes must provide the *filepath parameter.
route/route.go:131
Method
Fingerprint
Fingerprint returns a Metric's Fingerprint.
model/metric.go:77
Method
Fingerprint
Fingerprint returns the LabelSet's fingerprint.
model/labelset.go:143
Function
Fuzz
Fuzz text metric parser with with github.com/dvyukov/go-fuzz: go-fuzz-build github.com/prometheus/common/expfmt go-fuzz -bin expfmt-fuzz.zip -workd
expfmt/fuzz.go:28
Function
GetRevision
()
version/info_default.go:19
Method
Head
Head registers a new HEAD route.
route/route.go:113
Function
Info
Info returns version, branch and revision information.
version/info.go:96
Method
IsDir
IsDir implements the fs.FileInfo interface.
assets/embed_gzip.go:120
Method
IsValid
IsValid returns true iff the string is a valid UTF8.
model/labels.go:168
Method
Len
()
model/value.go:138
Method
Len
()
model/value.go:348
Method
Len
()
model/alert.go:107
Method
Len
Len implements sort.Interface.
model/fingerprinting.go:49
Method
Len
()
model/labels.go:144
Method
Len
()
model/labels.go:175
Method
Len
()
model/labels.go:197
Method
Len
()
internal/bitbucket.org/ww/goautoneg/autoneg.go:57
Method
Less
Less compares first the metrics, then the timestamp.
model/value.go:143
Method
Less
Less compares first the metrics, then the timestamp.
model/value.go:318
Method
Less
(i, j int)
model/value.go:349
Method
Less
(i, j int)
model/alert.go:110
Method
Less
Less implements sort.Interface.
model/fingerprinting.go:54
Method
Less
(i, j int)
model/labels.go:148
Method
Less
(i, j int)
model/labels.go:179
Method
Less
(i, j int)
model/labels.go:201
Method
Less
(i, j int)
internal/bitbucket.org/ww/goautoneg/autoneg.go:62
Method
MarshalJSON
MarshalJSON implements json.Marshaler.
model/value.go:74
Method
MarshalJSON
()
model/value.go:193
Method
MarshalJSON
MarshalJSON implements json.Marshaler.
model/value.go:259
Method
MarshalJSON
MarshalJSON implements json.Marshaler.
model/value.go:292
Method
MarshalJSON
MarshalJSON implements json.Marshaler.
model/value_float.go:35
Method
MarshalJSON
()
model/value_float.go:72
Method
MarshalJSON
MarshalJSON implements the json.Marshaler interface.
model/time.go:293
Method
MarshalJSON
MarshalJSON implements json.Marshaler.
model/value_type.go:43
Method
MarshalJSON
()
model/value_histogram.go:29
Method
MarshalJSON
()
model/value_histogram.go:52
Method
MarshalJSON
()
model/value_histogram.go:142
Method
MarshalJSON
MarshalJSON implements the json.Marshaler interface for TLSVersion.
config/http_config.go:107
Method
MarshalJSON
MarshalJSON implements the json.Marshaler interface for URL.
config/http_config.go:218
← previous
next →
201–300 of 539, ranked by callers