Move everything over to a more expensive but less collision-prone way.
However, keep the old fingerprinting under the name "FastFingerprint"
to be used in the storage layer (where we need collision detection
anyway).
This fixes https://github.com/prometheus/client_golang/issues/74 .
IT CHANGES THE FINGERPRINTING AND THEREFORE INVALIDATES EACH AND EVERY
PERSISTED FINGERPRINT (I.E. YOU HAVE TO WIPE THE STORAGE TO USE THIS).
This commit removes the LabelValuesToSignature function as it is used
nowhere (and broken in the way it is implemented right now).
Also, remove one more golint warning.
Also, add a test to expose
https://github.com/prometheus/client_golang/issues/74 .
benchmark old ns/op new ns/op delta
BenchmarkMetric 7034 6272 -10.83%
benchmark old allocs new allocs delta
BenchmarkMetric 52 32 -38.46%
benchmark old bytes new bytes delta
BenchmarkMetric 1976 1800 -8.91%
- Change Fingerprints to be simple uint64s.
- Deal sensibly with missing metric names.
- Enable finer-grained time resolution.
Merge this concurrently with the merge of the new storage backend into
prometheus/prometheus.
Change-Id: Idd82f137aa0c4286df422c53ce3c62e0de285360
Colliding labels can happen e.g. when an exporter job is scraped and already
includes "job" labels for its samples in /metrics. In this case, a
collisionPrefix of "exporter_" is added to the colliding target labels, but the
specifics (the collision prefix) are managed by Prometheus, not the client
library.
This commit introduces all relevant server-side artifacts such that the
Result streams can be used by external parties for one-off tools and
such. This will ultimately better enable us to support additional
wireformats with much more ease.