Gregor Jasny
2412990ee9
core: avoid collecting empty metric families
2021-03-09 13:21:22 +01:00
Gregor Jasny
1d36d42210
core: Replace name check regex ( #462 )
...
* core: test for more invalid lables
* core: rewrite label and metric name checks
The std::regex has the problem that it is not available everywhere
and also it's 75 times slower than the naive validity check.
```
BM_Label_Check_Regex 550 ns 550 ns 1270601
BM_Label_Check_NoRegex 7.50 ns 7.50 ns 92802503
```
2021-03-08 11:29:25 -08:00
Gregor Jasny
77b06a8709
core: reject duplicate label names ( #463 )
...
Issue: #459
2021-03-08 11:28:04 -08:00
Gregor Jasny
5699348faa
feat(cmake): Generate pkg-config files
...
Fixes : #447
2021-03-04 21:15:31 +01:00
Gregor Jasny
f448b2c3de
feat(iwyu): Organize includes with include-what-you-use
2021-03-03 22:11:10 +01:00
Gregor Jasny
58141879f6
core: Fix usage of std::to_chars
2021-02-05 12:56:29 +01:00
Gregor Jasny
bf0ddfc57b
fix: use printf %g or std::to_chars to serialize doubles
...
This will result in floating point numbers redered with the
necessary precision and avoids trailing zeroes.
Closes : #441
2021-01-10 00:31:14 +01:00
Gregor Jasny
8a74501158
Merge pull request #442 from LesnyRumcajs/add-missing-include
...
Added missing include
2021-01-05 05:18:33 +01:00
Hubert Bugaj
e0cc7b5e3e
Added missing include
2021-01-04 13:04:48 +01:00
Gregor Jasny
813a44477d
chore: remove extra block
2020-12-14 20:10:29 +01:00
Gregor Jasny
acab56c808
chore: re-format with clang-format 11
2020-12-14 20:05:20 +01:00
Gregor Jasny
d841f00378
core: enforce proper metric and label names
...
Closes : #421
2020-12-13 16:46:26 +01:00
Gregor Jasny
80513483a2
chore: use max_digits10 instead of magic number
2020-11-15 19:52:37 +01:00
Jupp Mueller
01c11d5bd6
Fix insufficiently precise value rendering
...
This change fixes #407 by increasing precision for rendered floating point numbers
output in the text serializer.
2020-11-06 09:53:23 -08:00
Gregor Jasny
6d86e2db65
core: Add test for negative observed histogram value
...
Fixes : #386
2020-11-01 12:11:54 +01:00
Dominik Charousset
efce85d54a
Use a gauge for the histogram sum
...
The online docs for Prometheus state:
> The sum of observations (...) behaves like a counter, too, as long as
> there are no negative observations.
A counter can only ever go up and asserts that users pass in only
positive values when incrementing. Hence, the `sum` must use a gauge in
order to stay consistent with the Prometheus documentation.
2020-11-01 12:10:42 +01:00
Gregor Jasny
054b49ba4a
core: allow logically negative gauge increments and decrements
...
This is in-line with the golang prometheus client library.
2020-11-01 12:09:08 +01:00
Gregor Jasny
d0e1056016
core: Explicitly link against libatomic when needed
...
Closes : #394
2020-09-27 16:34:40 +01:00
Gregor Jasny
5c771de785
core: Skip serialization test if locale is not available
...
Closes : #345
2020-03-13 13:21:57 +01:00
Gregor Jasny
62d673f09c
feat(core): Expect working German locale
2020-02-29 16:04:09 +01:00
Gregor Jasny
3018a51030
feat(pull): Add getter for listening ports
...
Closes : #334
2020-02-12 21:01:44 +01:00
Cheney Wang
023c93e4e5
Include missing <ostream>
2020-02-11 10:07:45 -08:00
David Avedissian
7a4b529869
Avoid copying the histogram metric buckets. ( #331 )
2020-01-30 14:35:42 -08:00
Benjamin Worpitz
7b63978099
Make Collect methods const ( #323 )
...
* Make Collect methods const
Collect methods should not influence the state of the objects in any
externally visible way.
* Update ABI version
* Fix interior mutablility problems
Co-authored-by: Jupp Mueller <jupp0r@gmail.com >
2019-12-19 21:37:34 -08:00
Gregor Jasny
582dbb0295
feat(core): Improve text_serializer.cc coverage
2019-11-03 16:43:47 +01:00
Gregor Jasny
2be75c533f
fix(core): Properly serialize newlines in label values
2019-11-03 15:58:10 +01:00
Gregor Jasny
f2a296ead8
feat(core): Improve text_serializer.cc coverage
2019-11-01 18:43:24 +01:00
Gregor Jasny
ca0b1e50c4
feat(core): Improve family.cc coverage
2019-11-01 18:43:18 +01:00
Gregor Jasny
c57ae5728f
fix(core): Make registry insert behavior configurable
...
Add three different insert strategies for the Registry.
The `NonStandardAppend` is only there and selected for
backward compatibility and most likely will go away
in the future.
2019-10-25 10:31:48 +02:00
Jupp Mueller
444a7a916e
Merge pull request #302 from gjasny/use-github-actions
...
Use GitHub actions
2019-10-22 08:23:54 -07:00
Gregor Jasny
5a3ee66c7e
fix(symbols): Fix Windows and Bazel symbol visibility
2019-10-18 23:19:17 +02:00
Gregor Jasny
b68155af29
chore: Simplify external templates
2019-10-18 09:28:09 +02:00
Gregor Jasny
70a1cfd60a
Merge pull request #305 from jupp0r/code-format
...
Code format
2019-10-18 09:04:13 +02:00
Gregor Jasny
c216ae7ae9
chore(clang-format): Format everything
2019-10-17 18:13:24 +02:00
Gregor Jasny
203f7f6e70
chore(bazel): Use True / False in boolean context
2019-10-17 18:07:44 +02:00
Gregor Jasny
815bfb9b29
chore(bazel): Use local_defines instead of copts
2019-10-17 17:58:31 +02:00
Gregor Jasny
3667f3ebb1
core: Do not run locale test on Windows
2019-09-26 22:21:59 +02:00
Gregor Jasny
b6a1b4c2fc
Implement symbol visibility build system agnostic
...
Issue: #223
2019-08-31 19:55:13 +02:00
Gregor Jasny
538ed3af0d
Add (shared) library versioning
...
Closes : #223
2019-08-31 18:21:11 +02:00
Gregor Jasny
1bf46d4e32
core: hide builder, family, and registry implementation
2019-08-31 12:41:22 +02:00
Jupp Mueller
a0ea1d0e5b
Merge pull request #296 from Metaswitch/histogram-observe-multiple
...
Fix Histogram::ObserveMultiple bug.
Now throw length_error if the number of bucket increments is not equal to the
number of buckets in the histogram.
2019-08-15 10:48:53 -07:00
David Ray
eb6f1ab157
Fix Histogram::ObserveMultiple bug. Now throw length_error if the number of bucket increments is not equal to the
...
number of buckets in the histogram.
2019-08-14 14:03:20 +01:00
Jupp Mueller
2252249259
Merge pull request #290 from Metaswitch/histogram-observe-multiple
...
Allow more than one histogram observation at a time
2019-08-08 17:41:12 -07:00
mkenigs
2865d2f6c1
benchmark includes
2019-08-08 10:55:37 -07:00
matthew
a34ead7027
include fixes
2019-08-08 09:52:41 -07:00
matthew
a1963aaa2f
builder
2019-08-08 09:48:06 -07:00
matthew
35d46a5712
forward declarations and use templatized
2019-08-08 09:48:06 -07:00
matthew
6d47a30b10
use templatized builder
2019-08-07 22:15:55 -07:00
matthew
32cfada5ab
delete builders
2019-08-07 22:13:30 -07:00
matthew
1b5cf25e10
CMake
2019-08-07 22:12:47 -07:00