Skip to content

Update from upstream#1

Merged
luan-cestari merged 30 commits intoluan-cestari:masterfrom
prometheus:master
May 19, 2018
Merged

Update from upstream#1
luan-cestari merged 30 commits intoluan-cestari:masterfrom
prometheus:master

Conversation

@luan-cestari
Copy link
Copy Markdown
Owner

No description provided.

erebe and others added 30 commits September 13, 2017 12:26
Make sure dropwizard imported metric does not start with number
* add initial memory metrics (#312)
- Now, we do 3 lookups in the children Map when we create a new tupple of
labels. From my understanding, it's to manage concurrent initializations.

It can be improved. I suggest to check the result of 'putIfAbsent' to avoid the third
lookup.

Because we do not want to create a new Child for each call to #labels, I
don't find a solution with only 1 lookup. BUT with Java 8, we can consider
the use of 'computeIfAbsent' with a lambda.
The switch statement was missing breaks for SUMMARY and HISTOGRAM cases.
Due to this bug wrong and duplicate collector names are produced for summaries and histograms.
- In 'unregister', remove the collector before its names, so
we do instructions in the reverse order compare to 'register'.
It is consistent with 'clear'.
- So we do 1 lookup in collectors hash map instead of 2.

Signed-off-by: Cyril Martin <[email protected]>
allow Gauges to time Callables + small fix in javadocs

Signed-off-by: Yaroslav Stavnichiy <[email protected]>
@luan-cestari luan-cestari merged commit 8a28c1c into luan-cestari:master May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.