Commit Graph

21 Commits

Author SHA1 Message Date
beorn7 1002745d7b Fix whitespace. 2015-03-03 18:41:06 +01:00
Julius Volz 738b69e61a Use non-rewritten Godep imports. 2015-02-27 16:49:40 +01:00
Julius Volz 169c8a68e1 Use godep with import rewriting for vendoring.
The new vendoring was produced by running:

    godep save -r ./examples/... ./prometheus/... ./text/... ./model/... ./extraction/...

Two things to note:

- "extraction/processor0_0_{1,2}_test.go" imported a package from
  "github.com/prometheus/prometheus", all for just one tiny testing
  function. To not have to deal with a circular vendoring dependency, I
  simply replaced the usage of the function by some in-line logic.

- godep grouped the rewritten imports slightly differently for some
  reason, but at least the standard library imports are still in a
  separate section. Not sure if it's worth manually keeping our old
  import grouping scheme or if we should simply use that godep-generated
  one.
2015-02-26 00:47:03 +01:00
beorn7 b1e7299877 Turned "le" and "quantile" label names into constants. 2015-02-19 15:54:26 +01:00
beorn7 b37ca982a9 Add support for optionally missing +Inf bucket in protobuf.
Also, clean up style issues in metricfamilyprocessor.go.
2015-02-19 15:54:26 +01:00
Julius Volz 765fdaf37e Update protobuf library package name.
The Golang protocol buffer library has now moved to GitHub:

https://github.com/golang/protobuf

Although "go get"-ing the old package name still works, moving
everything to the new one will make vendoring cleaner.

See also https://github.com/matttproud/golang_protobuf_extensions/pull/7
2015-02-14 00:00:34 +01:00
Björn Rabenstein 3d6b23ae05 Merge pull request #76 from prometheus/histogram
Add support for histograms to parsers, extraction and creation.
2015-02-12 19:33:48 +01:00
Brian Brazil 6f2f8f28e8 Add support for histograms to parsers, extraction and creation.
This does not include a histogram metric usable from the go client.

See https://docs.google.com/document/d/1uSenXRDjDaJLV3qnSD09GqgPdEEDPjER0mVsnGaCYF0/edit#
2015-02-12 18:29:26 +00:00
Bjoern Rabenstein d7f8eb1083 Change "Prometheus Team" to "The Prometheus Authors". 2015-02-02 15:14:36 +01:00
Bjoern Rabenstein 4092aaec40 Fix typos. 2015-01-27 18:07:09 +01:00
Bjoern Rabenstein b2128904e2 Add BenchmarkProcessor002ParseOnly, to get at least a hint of the JSON speed. 2015-01-27 17:16:23 +01:00
Bjoern Rabenstein 849d859db4 Add benchmarks to compare text and protobuf parsing. 2015-01-27 16:27:04 +01:00
Bjoern Rabenstein 29347ab2a9 Add a few trailing commas to tests.
That is to prove that trailing commas work for the processor.

Change-Id: Ibecac811d47958387c9633df69bafbe284cf0b8f
2014-12-05 14:23:03 +01:00
Bjoern Rabenstein 5d40912fd2 Complete rewrite of the exposition library.
This rewrite had may backs and forths. In my git repository, it
consists of 35 commits which I cannot group or merge into reasonable
review buckets. Gerrit breaks fundamental git semantics, so I have to
squash the 35 commits into one for the review.

I'll push this not with refs/for/master, but with refs/for/next so
that we can transition after submission in a controlled fashion.

For the review, I recommend to start with looking at godoc and in
particular the many examples. After that, continue with a line-by-line
detailed review. (The big picture is hopefully as expected after
wrapping up the discussion earlier.)

Change-Id: Ib38cc46493a5139ca29d84020650929d94cac850
2014-06-17 14:08:22 +02:00
Bjoern Rabenstein d3ebb29141 Fix escaping even more.
Change-Id: Ie958d557aae0dda68c451e9fafc615221cc07bb0
2014-05-15 12:49:39 +02:00
Bjoern Rabenstein 82e55cd560 Fix docstring escaping.
Change-Id: Ib8c8658795c9e2b0fa1a9321d7cbdef7ad4f2745
2014-05-14 18:46:58 +02:00
Bjoern Rabenstein 44926efd85 Fix typo.
Change-Id: I1b28a0f232e88b79bc34a458c115bcf74e978284
2014-05-14 14:51:12 +02:00
Bjoern Rabenstein 3dfae09d30 Fix things commented on in past code review.
Change-Id: I4dafd098eefa99bc37fdbfebeb4c61a7251ad0be
2014-04-29 13:37:49 +02:00
Bjoern Rabenstein 84dc53148d Enable the Golang client library to create the new text formats.
Most important here is the simple & flat text format, but while I'm on
it, I have also added the text representations for protobufs (which is
purely meant for debugging purposes). I hope my basic idea about
handling those various protocols (and the text package) becomes
clearer now.

Change-Id: I7299853eadc82a426101e907f2b3d4e37f9e4c71
2014-04-25 21:45:04 +02:00
Bjoern Rabenstein e5dc0421cd Move signature.go and related tests to the model package.
The LabelsToSignature function is now used outside of the prometheus
package, too. Leaving it in the prometheuos package is misleading
design and will lead to circulat import chains soon.

Change-Id: If1ca442d4023b33b138cf79fee68e82ff2a355be
2014-04-25 20:48:16 +02:00
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