Commit Graph

1349 Commits

Author SHA1 Message Date
beorn7 28973f4d4f Add a histogram to the random example. 2015-02-23 16:19:01 +01:00
beorn7 14c2f30b35 Update vendoring of beorn7/perks. 2015-02-23 14:59:14 +01:00
Björn Rabenstein 54238dea8f Merge pull request #80 from peterbourgon/histogram-registry-fix
Fix for Histogram in registry.writePB
2015-02-20 19:23:41 +01:00
Peter Bourgon 69c8dc87e9 Fix for Histogram in registry.writePB 2015-02-20 19:08:36 +01:00
Björn Rabenstein bc1f2b27ad Merge pull request #79 from prometheus/beorn7/histogram
Use binary search to pick bucket.
2015-02-20 15:54:51 +01:00
beorn7 79efd06178 Use binary search to pick bucket.
With the usual number of buckets, this doesn't really make a
difference, but it should scale... See the added TODO for the precise
numbers.
2015-02-20 15:53:53 +01:00
Björn Rabenstein 38dbb2e268 Merge pull request #78 from prometheus/beorn7/histogram
Histograms for the exposition library.
2015-02-19 16:16:15 +01:00
beorn7 9eaf3705d2 Avoid "online serving system". 2015-02-19 16:03:24 +01:00
beorn7 000ef45157 Replaced http by HTTP if used as the name of the protocol in English. 2015-02-19 15:54:26 +01:00
beorn7 b1e7299877 Turned "le" and "quantile" label names into constants. 2015-02-19 15:54:26 +01:00
beorn7 3e50eddd64 Do not count the +Inf bucket for bucket creation.
Add explanation for DefBuckets.
2015-02-19 15:54:26 +01:00
beorn7 4c4f51d546 Catch illegal label names for summaries in histograms. 2015-02-19 15:54:26 +01:00
beorn7 6958242277 Add support for histograms to the Go client library. 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
beorn7 a7c56882af Mark slow test as such and exclude them from travis. 2015-02-19 15:51:11 +01:00
juliusv 4627d59e8a Merge pull request #77 from prometheus/update-protobuf-pkg
Update protobuf library package name.
2015-02-14 00:04:33 +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 70f54973fb Merge pull request #75 from prometheus/beorn7/timestamp
Reduce allocations during fingerprinting.
2015-02-12 20:02:02 +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
beorn7 a9bdd32c71 Reduce allocations during fingerprinting.
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%
2015-02-12 15:28:31 +01:00
Tobias Schmidt 3d127c266e Merge pull request #73 from ddysher/fix-doc
Fix document
2015-02-11 17:44:59 -05:00
Deyuan Deng 550b950411 Fix document 2015-02-11 17:35:04 -05:00
Tobias Schmidt acbd2d3eac Merge pull request #70 from prometheus/handle-process-collector-errors-gracefully
Handle process collector errors gracefully
2015-02-11 15:08:24 -05:00
Tobias Schmidt 98061eecab Add todo comment to bring back error reporting 2015-02-11 14:58:35 -05:00
Björn Rabenstein 6760c3aacd Merge pull request #71 from prometheus/beorn7/timestamp
Remove obsolete comment and add Earliest and Latest timestamp.
2015-02-11 17:44:10 +01:00
beorn7 7d560564f9 Remove obsolete comment and add Earliest and Latest timestamp.
The latter is to eradicate the various MaxInt64 and MinInt64 in the
codebase.
2015-02-11 17:34:59 +01:00
Tobias Schmidt 7faf9e76ef Handle process collector errors gracefully
As it is expected that the process collector can fail under certain
conditions (proc information for a process only readable by root or
other user for example) and as there is currently no option to configure
the error behavior of the client, this change reverts the error
reporting introduced in 159e96f. This effectively means that errors are
simply ignored and there won't be any samples for the process_* metrics
in case of an error.

Once a user can control how to behave in case of errors returned by
collectors, this change should probably be reverted.
2015-02-10 16:19:27 -05:00
Tobias Schmidt c70db11f1e Merge pull request #68 from prometheus/add-nocgo-flag
Add 'nocgo' tag to remove cgo dependency on build
2015-02-10 03:43:17 -05:00
Johannes 'fish' Ziemke 93d11c8e35 Remove procfs dependency unless cgo is enabled 2015-02-09 16:38:04 +01:00
juliusv 52186fc518 Merge pull request #67 from prometheus/arch-os-build-fixes
Fix Go download link for several archs and OSes.
2015-02-05 18:14:57 +01:00
Julius Volz ecf2329b22 Use HTTPS for Go download. 2015-02-05 18:14:34 +01:00
Julius Volz 2e52ab1271 Fix Go download link for several archs and OSes. 2015-02-05 18:14:34 +01:00
Tobias Schmidt 3823272e90 Merge pull request #65 from prometheus/procfs-build-tags
Remove dependency on procfs/cgo in non-procfs systems
2015-02-02 15:51:36 -05:00
Tobias Schmidt d1d9dee31b Remove dependency on procfs/cgo in non-procfs systems
The procfs package has a cgo dependency (necessary to calculate system
times). As procfs is not available under windows, darwin and supposely
all newer BSD systems, this change remove the procfs dependency on these
systems.
2015-02-02 15:40:04 -05:00
Tobias Schmidt 728064bb68 Merge pull request #66 from prometheus/process-collector-explicit-error-interface
Use clear error interface for process pidFn
2015-02-02 15:06:09 -05:00
Tobias Schmidt 3cb16a9503 Use clear error interface for process pidFn
If a given pidFn for a process collector can't determine the pid, this
had to be signaled with an invalid pid so far (pid <= 0). In order to
make the error interface clearer for users, this change introduces an
explicit error parameter.
2015-02-02 14:59:24 -05:00
Björn Rabenstein babc844741 Merge pull request #64 from prometheus/beorn7/performance
Improve Gauge and Counter performance.
2015-02-02 18:51:05 +01:00
beorn7 4f73a8b017 Improve Gauge and Counter performance.
This is accomplished by using the functions from the atomic packages
instead of a mutex.

benchmark                                      old ns/op     new ns/op     delta
BenchmarkGaugeNoLabels-2                       118           9.40          -92.03%
BenchmarkGaugeNoLabels                         117           9.38          -91.98%
BenchmarkGaugeNoLabels-4                       117           9.40          -91.97%
BenchmarkCounterNoLabels-2                     137           16.8          -87.74%
BenchmarkCounterNoLabels                       136           16.8          -87.65%
BenchmarkCounterNoLabels-4                     136           16.8          -87.65%
BenchmarkGaugeWithLabelValues-4                400           279           -30.25%
BenchmarkGaugeWithLabelValues-2                398           279           -29.90%
BenchmarkGaugeWithLabelValues                  400           283           -29.25%
BenchmarkCounterWithLabelValues-4              397           286           -27.96%
BenchmarkCounterWithLabelValues-2              396           286           -27.78%
BenchmarkCounterWithLabelValues                394           285           -27.66%
BenchmarkCounterWithPreparedMappedLabels       587           454           -22.66%
BenchmarkCounterWithPreparedMappedLabels-2     581           456           -21.51%
BenchmarkCounterWithPreparedMappedLabels-4     654           539           -17.58%
BenchmarkCounterWithMappedLabels-2             1441          1218          -15.48%
BenchmarkCounterWithMappedLabels               1099          963           -12.37%
BenchmarkCounterWithMappedLabels-4             1636          1501          -8.25%
2015-02-02 18:11:11 +01:00
Björn Rabenstein 88b6ea5852 Merge pull request #63 from prometheus/beorn7/versioning
Introduce versioning and clean up the headers.
2015-02-02 15:33:45 +01:00
Bjoern Rabenstein b0107f53ac Added CHANGELOG.md and VERSION. 2015-02-02 15:25:18 +01:00
Bjoern Rabenstein d7f8eb1083 Change "Prometheus Team" to "The Prometheus Authors". 2015-02-02 15:14:36 +01:00
Björn Rabenstein aa1328d02c Merge pull request #62 from prometheus/fix-writepb-race
Fix race condition in writePB().
2015-01-31 23:52:10 +01:00
Julius Volz f3e101bd1c Fix race condition in writePB().
The RLock already needs to be acquired when reading r.dimHashesByName.

This fixes https://github.com/prometheus/client_golang/issues/61
2015-01-31 22:10:27 +01:00
Björn Rabenstein e192dfc497 Merge pull request #60 from prometheus/beorn7/fix-const-labels
Add const labels to counter.
2015-01-28 15:59:29 +01:00
Bjoern Rabenstein 3798bbca12 Add const labels to counter. 2015-01-28 15:47:48 +01:00
Björn Rabenstein 80ad13d35e Merge pull request #53 from prometheus/beorn7/benchmark
Add benchmarks to compare text and protobuf parsing.
2015-01-27 18:15:20 +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