client_golang/prometheus
Bjoern Rabenstein ecac33bed0 Conversion back and forth between MetricFamily protobuf and text format.
The idea here is to always go via the protobufs if dealing with the
text format. That won't always be the most efficient way, but it
avoids the multiplicity of conversion routines required for direct
conversion (e.g. text format -> internal representation in the
Prometheus server). The loss of efficiency is acceptable because the
text format should not be used in high performance (high throughput,
low latency) situations anyway.

In that way, the text format stays perfectly isolated from other parts
of the code. To receive text format, just plug the conversion in
before the code path that normally reads protobufs. Correspondingly,
for sending text format, simply replace the WriteDelimited call by a
text.Create call.

Nevertheless, the conversion code itself is optimized for efficiency
and minimized memory churn (which was one of the reason for handcoding
the parser and not using a lexer/parser code generation tool).

Change-Id: Iee45ffe8aa421a844225d13a1f859becd8a3b066
2014-04-17 16:28:13 +02:00
..
exp Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
.gitignore Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
Makefile Enclose artifact generation process into Makefile. 2013-07-21 17:45:53 +02:00
accumulating_bucket.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
accumulating_bucket_test.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
bucket.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
constants.go Optimize fingerprinting and metric locks. 2014-04-14 19:06:09 +02:00
counter.go Optimize fingerprinting and metric locks. 2014-04-14 19:06:09 +02:00
counter_test.go Add Reset(map[string]string) to Metric interface 2014-02-19 15:18:16 +01:00
distributions.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
documentation.go Extract core Prometheus value decoders. 2013-06-10 19:35:41 +02:00
eviction.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
eviction_test.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
gauge.go Optimize fingerprinting and metric locks. 2014-04-14 19:06:09 +02:00
gauge_test.go Add Reset(map[string]string) to Metric interface 2014-02-19 15:18:16 +01:00
helpers_test.go Rename test helper files to helpers_test.go 2013-05-06 11:13:44 +02:00
histogram.go Fix lock semantics on Summary#Reset. 2014-04-15 01:49:28 +02:00
histogram_test.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
interface.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
metric.go Add Reset(map[string]string) to Metric interface 2014-02-19 15:18:16 +01:00
priority_queue.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
priority_queue_test.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
prometheus_test.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
registry.go Conversion back and forth between MetricFamily protobuf and text format. 2014-04-17 16:28:13 +02:00
registry_test.go Optimize fingerprinting and metric locks. 2014-04-14 19:06:09 +02:00
signature.go Conversion back and forth between MetricFamily protobuf and text format. 2014-04-17 16:28:13 +02:00
signature_test.go Conversion back and forth between MetricFamily protobuf and text format. 2014-04-17 16:28:13 +02:00
statistics.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
statistics_test.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
tallying_bucket.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
tallying_bucket_test.go Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
telemetry.go Registry and Metrics implement json.Marshaler 2013-04-19 15:07:24 +02:00