Skip to content

Improve CollectorRegistry#unregister() - #335

Merged
brian-brazil merged 1 commit into
prometheus:masterfrom
mcoolive:pr-collector-unregister
Jan 28, 2018
Merged

Improve CollectorRegistry#unregister()#335
brian-brazil merged 1 commit into
prometheus:masterfrom
mcoolive:pr-collector-unregister

Conversation

@mcoolive

Copy link
Copy Markdown
  • In 'unregister', remove the collector before its names, so we do operations
    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 c.martin@criteo.com

- 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 <c.martin@criteo.com>
@brian-brazil
brian-brazil merged commit 9d14f76 into prometheus:master Jan 28, 2018
@brian-brazil

Copy link
Copy Markdown
Contributor

Thanks!

@mcoolive
mcoolive deleted the pr-collector-unregister branch January 30, 2018 13:25
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.

2 participants