-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce constrainLabels allocations #1272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
Hm, this seems great initially, but we need to double check if it's not breaking change or problematic for people or our code. Generally reusing input memory is considered as a side effect of the function, which can cause hard to find bugs for people (modifying in place).
cc @beorn7 do you know from the top of your head if this semantics trigger some bad memories ? (((:
} | ||
return constrainedValues | ||
} | ||
|
||
func constrainLabelValues(desc *Desc, lvs []string, curry []curriedLabelValue) []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do similar here for consistency?
Signed-off-by: Bulat Khasanov <[email protected]>
Signed-off-by: Bulat Khasanov <[email protected]>
Ok, looks like it better to use sync.Pool to prevent side effects. |
I added a benchmark. Results in main branch:
In PR:
PS. Currently maps are not shrinking in Go golang/go#20135 |
We dave certainly done a bunch of quite daring optimizations in client_golang in the past. It is, after all, often in a very hot code path of a lot of programs. I have to leave the detailed code review to you, but at first glance, I don't see any red flags. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great iteration and safe. We can experiment with more aggressive label reuse, but this is already a big improvement.
Also, I just noticed: Constrained labels is very rarely used feature (new one). I believe there is room to never allocate anything and do it only if metric HAS some constrained labels defined. WDYT? It's essentially a little bit of regression and thanks for noticing this!
Thanks 💪🏽
* Add bench Signed-off-by: Bulat Khasanov <[email protected]> * Reduce constrainLabels allocations Signed-off-by: Bulat Khasanov <[email protected]> --------- Signed-off-by: Bulat Khasanov <[email protected]> Signed-off-by: krishnaduttPanchagnula <[email protected]>
….0 (#709) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | require | minor | `v1.15.1` -> `v1.16.0` | --- ### Release Notes <details> <summary>prometheus/client_golang</summary> ### [`v1.16.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.16.0) [Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.15.1...v1.16.0) #### What's Changed - \[BUGFIX] api: Switch to POST for LabelNames, Series, and QueryExemplars. [#​1252](https://togithub.com/prometheus/client_golang/issues/1252) - \[BUGFIX] api: Fix undefined execution order in return statements. [#​1260](https://togithub.com/prometheus/client_golang/issues/1260) - \[BUGFIX] native histograms: Fix bug in bucket key calculation. [#​1279](https://togithub.com/prometheus/client_golang/issues/1279) - \[ENHANCEMENT] Reduce constrainLabels allocations for all metrics. [#​1272](https://togithub.com/prometheus/client_golang/issues/1272) - \[ENHANCEMENT] promhttp: Add process start time header for scrape efficiency. [#​1278](https://togithub.com/prometheus/client_golang/issues/1278) - \[ENHANCEMENT] promlint: Improve metricUnits runtime. [#​1286](https://togithub.com/prometheus/client_golang/issues/1286) <details> <summary> Commits </summary> - Merge v1.15 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1250](https://togithub.com/prometheus/client_golang/pull/1250) - Switch to POST for LabelNames, Series, and QueryExemplars to DoGetFallback by [@​jacksontj](https://togithub.com/jacksontj) in [https://github.com/prometheus/client_golang/pull/1252](https://togithub.com/prometheus/client_golang/pull/1252) - ✏️ \[collectors]: fix typo in test assertion by [@​vegerot](https://togithub.com/vegerot) in [https://github.com/prometheus/client_golang/pull/1153](https://togithub.com/prometheus/client_golang/pull/1153) - Added interactive tutorial \[kubeCon] by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1255](https://togithub.com/prometheus/client_golang/pull/1255) - Fixed tutorial. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1256](https://togithub.com/prometheus/client_golang/pull/1256) - Bump golang.org/x/sys from 0.6.0 to 0.7.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1265](https://togithub.com/prometheus/client_golang/pull/1265) - Cleanup proto use in tests by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/client_golang/pull/1264](https://togithub.com/prometheus/client_golang/pull/1264) - Fix tutorial on WSL-based systems by [@​marevers](https://togithub.com/marevers) in [https://github.com/prometheus/client_golang/pull/1257](https://togithub.com/prometheus/client_golang/pull/1257) - Fix undefined execution order in return statements by [@​PiotrLewandowski323](https://togithub.com/PiotrLewandowski323) in [https://github.com/prometheus/client_golang/pull/1260](https://togithub.com/prometheus/client_golang/pull/1260) - Merge release 1.15.1 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1267](https://togithub.com/prometheus/client_golang/pull/1267) - GitHub Workflows security hardening by [@​sashashura](https://togithub.com/sashashura) in [https://github.com/prometheus/client_golang/pull/1180](https://togithub.com/prometheus/client_golang/pull/1180) - add process start time header to client_golang prometheus by [@​logicalhan](https://togithub.com/logicalhan) in [https://github.com/prometheus/client_golang/pull/1278](https://togithub.com/prometheus/client_golang/pull/1278) - Fix bug in bucket key calculation by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1279](https://togithub.com/prometheus/client_golang/pull/1279) - Bump github.com/prometheus/procfs from 0.9.0 to 0.10.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1283](https://togithub.com/prometheus/client_golang/pull/1283) - Reduce constrainLabels allocations by [@​khasanovbi](https://togithub.com/khasanovbi) in [https://github.com/prometheus/client_golang/pull/1272](https://togithub.com/prometheus/client_golang/pull/1272) - added circleci as gh action YAML by [@​krishnaduttPanchagnula](https://togithub.com/krishnaduttPanchagnula) in [https://github.com/prometheus/client_golang/pull/1281](https://togithub.com/prometheus/client_golang/pull/1281) - Improve metricUnits runtime by [@​avlitman](https://togithub.com/avlitman) in [https://github.com/prometheus/client_golang/pull/1286](https://togithub.com/prometheus/client_golang/pull/1286) - Moving fully to GH actions. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1288](https://togithub.com/prometheus/client_golang/pull/1288) - Fix docstring references to renamed native histogram fields / functions. by [@​juliusv](https://togithub.com/juliusv) in [https://github.com/prometheus/client_golang/pull/1290](https://togithub.com/prometheus/client_golang/pull/1290) - Fixed README & CHANGELOG; Added fmt makefile command (+bingo) for easier contributions. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1289](https://togithub.com/prometheus/client_golang/pull/1289) - </details> #### New Contributors * @​vegerot made their first contributi[https://github.com/prometheus/client_golang/pull/1153](https://togithub.com/prometheus/client_golang/pull/1153)l/1153 * @​marevers made their first contributi[https://github.com/prometheus/client_golang/pull/1257](https://togithub.com/prometheus/client_golang/pull/1257)l/1257 * @​PiotrLewandowski323 made their first contributi[https://github.com/prometheus/client_golang/pull/1260](https://togithub.com/prometheus/client_golang/pull/1260)l/1260 * @​sashashura made their first contributi[https://github.com/prometheus/client_golang/pull/1180](https://togithub.com/prometheus/client_golang/pull/1180)l/1180 * @​logicalhan made their first contributi[https://github.com/prometheus/client_golang/pull/1278](https://togithub.com/prometheus/client_golang/pull/1278)l/1278 * @​khasanovbi made their first contributi[https://github.com/prometheus/client_golang/pull/1272](https://togithub.com/prometheus/client_golang/pull/1272)l/1272 * @​krishnaduttPanchagnula made their first contributi[https://github.com/prometheus/client_golang/pull/1281](https://togithub.com/prometheus/client_golang/pull/1281)l/1281 * @​avlitman made their first contributi[https://github.com/prometheus/client_golang/pull/1286](https://togithub.com/prometheus/client_golang/pull/1286)l/1286 **Full Changelog**: prometheus/client_golang@v1.15.1...v1.16.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/open-feature/flagd). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTcuMyIsInVwZGF0ZWRJblZlciI6IjM1LjExNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | require | minor | `v1.15.1` -> `v1.16.0` | --- ### Release Notes <details> <summary>prometheus/client_golang</summary> ### [`v1.16.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.16.0) [Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.15.1...v1.16.0) #### What's Changed - \[BUGFIX] api: Switch to POST for LabelNames, Series, and QueryExemplars. [#​1252](https://togithub.com/prometheus/client_golang/issues/1252) - \[BUGFIX] api: Fix undefined execution order in return statements. [#​1260](https://togithub.com/prometheus/client_golang/issues/1260) - \[BUGFIX] native histograms: Fix bug in bucket key calculation. [#​1279](https://togithub.com/prometheus/client_golang/issues/1279) - \[ENHANCEMENT] Reduce constrainLabels allocations for all metrics. [#​1272](https://togithub.com/prometheus/client_golang/issues/1272) - \[ENHANCEMENT] promhttp: Add process start time header for scrape efficiency. [#​1278](https://togithub.com/prometheus/client_golang/issues/1278) - \[ENHANCEMENT] promlint: Improve metricUnits runtime. [#​1286](https://togithub.com/prometheus/client_golang/issues/1286) <details> <summary> Commits </summary> - Merge v1.15 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1250](https://togithub.com/prometheus/client_golang/pull/1250) - Switch to POST for LabelNames, Series, and QueryExemplars to DoGetFallback by [@​jacksontj](https://togithub.com/jacksontj) in [https://github.com/prometheus/client_golang/pull/1252](https://togithub.com/prometheus/client_golang/pull/1252) - ✏️ \[collectors]: fix typo in test assertion by [@​vegerot](https://togithub.com/vegerot) in [https://github.com/prometheus/client_golang/pull/1153](https://togithub.com/prometheus/client_golang/pull/1153) - Added interactive tutorial \[kubeCon] by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1255](https://togithub.com/prometheus/client_golang/pull/1255) - Fixed tutorial. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1256](https://togithub.com/prometheus/client_golang/pull/1256) - Bump golang.org/x/sys from 0.6.0 to 0.7.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1265](https://togithub.com/prometheus/client_golang/pull/1265) - Cleanup proto use in tests by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/client_golang/pull/1264](https://togithub.com/prometheus/client_golang/pull/1264) - Fix tutorial on WSL-based systems by [@​marevers](https://togithub.com/marevers) in [https://github.com/prometheus/client_golang/pull/1257](https://togithub.com/prometheus/client_golang/pull/1257) - Fix undefined execution order in return statements by [@​PiotrLewandowski323](https://togithub.com/PiotrLewandowski323) in [https://github.com/prometheus/client_golang/pull/1260](https://togithub.com/prometheus/client_golang/pull/1260) - Merge release 1.15.1 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1267](https://togithub.com/prometheus/client_golang/pull/1267) - GitHub Workflows security hardening by [@​sashashura](https://togithub.com/sashashura) in [https://github.com/prometheus/client_golang/pull/1180](https://togithub.com/prometheus/client_golang/pull/1180) - add process start time header to client_golang prometheus by [@​logicalhan](https://togithub.com/logicalhan) in [https://github.com/prometheus/client_golang/pull/1278](https://togithub.com/prometheus/client_golang/pull/1278) - Fix bug in bucket key calculation by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1279](https://togithub.com/prometheus/client_golang/pull/1279) - Bump github.com/prometheus/procfs from 0.9.0 to 0.10.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1283](https://togithub.com/prometheus/client_golang/pull/1283) - Reduce constrainLabels allocations by [@​khasanovbi](https://togithub.com/khasanovbi) in [https://github.com/prometheus/client_golang/pull/1272](https://togithub.com/prometheus/client_golang/pull/1272) - added circleci as gh action YAML by [@​krishnaduttPanchagnula](https://togithub.com/krishnaduttPanchagnula) in [https://github.com/prometheus/client_golang/pull/1281](https://togithub.com/prometheus/client_golang/pull/1281) - Improve metricUnits runtime by [@​avlitman](https://togithub.com/avlitman) in [https://github.com/prometheus/client_golang/pull/1286](https://togithub.com/prometheus/client_golang/pull/1286) - Moving fully to GH actions. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1288](https://togithub.com/prometheus/client_golang/pull/1288) - Fix docstring references to renamed native histogram fields / functions. by [@​juliusv](https://togithub.com/juliusv) in [https://github.com/prometheus/client_golang/pull/1290](https://togithub.com/prometheus/client_golang/pull/1290) - Fixed README & CHANGELOG; Added fmt makefile command (+bingo) for easier contributions. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1289](https://togithub.com/prometheus/client_golang/pull/1289) - </details> #### New Contributors * @​vegerot made their first contributi[https://github.com/prometheus/client_golang/pull/1153](https://togithub.com/prometheus/client_golang/pull/1153)l/1153 * @​marevers made their first contributi[https://github.com/prometheus/client_golang/pull/1257](https://togithub.com/prometheus/client_golang/pull/1257)l/1257 * @​PiotrLewandowski323 made their first contributi[https://github.com/prometheus/client_golang/pull/1260](https://togithub.com/prometheus/client_golang/pull/1260)l/1260 * @​sashashura made their first contributi[https://github.com/prometheus/client_golang/pull/1180](https://togithub.com/prometheus/client_golang/pull/1180)l/1180 * @​logicalhan made their first contributi[https://github.com/prometheus/client_golang/pull/1278](https://togithub.com/prometheus/client_golang/pull/1278)l/1278 * @​khasanovbi made their first contributi[https://github.com/prometheus/client_golang/pull/1272](https://togithub.com/prometheus/client_golang/pull/1272)l/1272 * @​krishnaduttPanchagnula made their first contributi[https://github.com/prometheus/client_golang/pull/1281](https://togithub.com/prometheus/client_golang/pull/1281)l/1281 * @​avlitman made their first contributi[https://github.com/prometheus/client_golang/pull/1286](https://togithub.com/prometheus/client_golang/pull/1286)l/1286 **Full Changelog**: prometheus/client_golang@v1.15.1...v1.16.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/hetznercloud/hcloud-cloud-controller-manager). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTcuMyIsInVwZGF0ZWRJblZlciI6IjM1LjExNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | require | minor | `v1.15.1` -> `v1.16.0` | --- ### Release Notes <details> <summary>prometheus/client_golang</summary> ### [`v1.16.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.16.0) #### What's Changed - \[BUGFIX] api: Switch to POST for LabelNames, Series, and QueryExemplars. [#​1252](https://togithub.com/prometheus/client_golang/issues/1252) - \[BUGFIX] api: Fix undefined execution order in return statements. [#​1260](https://togithub.com/prometheus/client_golang/issues/1260) - \[BUGFIX] native histograms: Fix bug in bucket key calculation. [#​1279](https://togithub.com/prometheus/client_golang/issues/1279) - \[ENHANCEMENT] Reduce constrainLabels allocations for all metrics. [#​1272](https://togithub.com/prometheus/client_golang/issues/1272) - \[ENHANCEMENT] promhttp: Add process start time header for scrape efficiency. [#​1278](https://togithub.com/prometheus/client_golang/issues/1278) - \[ENHANCEMENT] promlint: Improve metricUnits runtime. [#​1286](https://togithub.com/prometheus/client_golang/issues/1286) <details> <summary> Commits </summary> - Merge v1.15 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1250](https://togithub.com/prometheus/client_golang/pull/1250) - Switch to POST for LabelNames, Series, and QueryExemplars to DoGetFallback by [@​jacksontj](https://togithub.com/jacksontj) in [https://github.com/prometheus/client_golang/pull/1252](https://togithub.com/prometheus/client_golang/pull/1252) - ✏️ \[collectors]: fix typo in test assertion by [@​vegerot](https://togithub.com/vegerot) in [https://github.com/prometheus/client_golang/pull/1153](https://togithub.com/prometheus/client_golang/pull/1153) - Added interactive tutorial \[kubeCon] by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1255](https://togithub.com/prometheus/client_golang/pull/1255) - Fixed tutorial. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1256](https://togithub.com/prometheus/client_golang/pull/1256) - Bump golang.org/x/sys from 0.6.0 to 0.7.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1265](https://togithub.com/prometheus/client_golang/pull/1265) - Cleanup proto use in tests by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/client_golang/pull/1264](https://togithub.com/prometheus/client_golang/pull/1264) - Fix tutorial on WSL-based systems by [@​marevers](https://togithub.com/marevers) in [https://github.com/prometheus/client_golang/pull/1257](https://togithub.com/prometheus/client_golang/pull/1257) - Fix undefined execution order in return statements by [@​PiotrLewandowski323](https://togithub.com/PiotrLewandowski323) in [https://github.com/prometheus/client_golang/pull/1260](https://togithub.com/prometheus/client_golang/pull/1260) - Merge release 1.15.1 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1267](https://togithub.com/prometheus/client_golang/pull/1267) - GitHub Workflows security hardening by [@​sashashura](https://togithub.com/sashashura) in [https://github.com/prometheus/client_golang/pull/1180](https://togithub.com/prometheus/client_golang/pull/1180) - add process start time header to client_golang prometheus by [@​logicalhan](https://togithub.com/logicalhan) in [https://github.com/prometheus/client_golang/pull/1278](https://togithub.com/prometheus/client_golang/pull/1278) - Fix bug in bucket key calculation by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1279](https://togithub.com/prometheus/client_golang/pull/1279) - Bump github.com/prometheus/procfs from 0.9.0 to 0.10.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1283](https://togithub.com/prometheus/client_golang/pull/1283) - Reduce constrainLabels allocations by [@​khasanovbi](https://togithub.com/khasanovbi) in [https://github.com/prometheus/client_golang/pull/1272](https://togithub.com/prometheus/client_golang/pull/1272) - added circleci as gh action YAML by [@​krishnaduttPanchagnula](https://togithub.com/krishnaduttPanchagnula) in [https://github.com/prometheus/client_golang/pull/1281](https://togithub.com/prometheus/client_golang/pull/1281) - Improve metricUnits runtime by [@​avlitman](https://togithub.com/avlitman) in [https://github.com/prometheus/client_golang/pull/1286](https://togithub.com/prometheus/client_golang/pull/1286) - Moving fully to GH actions. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1288](https://togithub.com/prometheus/client_golang/pull/1288) - Fix docstring references to renamed native histogram fields / functions. by [@​juliusv](https://togithub.com/juliusv) in [https://github.com/prometheus/client_golang/pull/1290](https://togithub.com/prometheus/client_golang/pull/1290) - Fixed README & CHANGELOG; Added fmt makefile command (+bingo) for easier contributions. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1289](https://togithub.com/prometheus/client_golang/pull/1289) - </details> #### New Contributors * @​vegerot made their first contributi[https://github.com/prometheus/client_golang/pull/1153](https://togithub.com/prometheus/client_golang/pull/1153)l/1153 * @​marevers made their first contributi[https://github.com/prometheus/client_golang/pull/1257](https://togithub.com/prometheus/client_golang/pull/1257)l/1257 * @​PiotrLewandowski323 made their first contributi[https://github.com/prometheus/client_golang/pull/1260](https://togithub.com/prometheus/client_golang/pull/1260)l/1260 * @​sashashura made their first contributi[https://github.com/prometheus/client_golang/pull/1180](https://togithub.com/prometheus/client_golang/pull/1180)l/1180 * @​logicalhan made their first contributi[https://github.com/prometheus/client_golang/pull/1278](https://togithub.com/prometheus/client_golang/pull/1278)l/1278 * @​khasanovbi made their first contributi[https://github.com/prometheus/client_golang/pull/1272](https://togithub.com/prometheus/client_golang/pull/1272)l/1272 * @​krishnaduttPanchagnula made their first contributi[https://github.com/prometheus/client_golang/pull/1281](https://togithub.com/prometheus/client_golang/pull/1281)l/1281 * @​avlitman made their first contributi[https://github.com/prometheus/client_golang/pull/1286](https://togithub.com/prometheus/client_golang/pull/1286)l/1286 **Full Changelog**: prometheus/client_golang@v1.15.1...v1.16.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on Monday" in timezone Europe/Paris, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/cozy/cozy-stack). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMjYuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEyNi4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
Historical note: this code was changed again in #1296 |
Thanks for bringing my reviewing mistake again =D (we missed we allocate a lot of memory even if constrained feature is not used) |
No shade intended; just took me a little time to trace the history so I added a breadcrumb. |
Hi, in my application prometheus allocates a lot of memory in constrainLabels.
I suggest replacing labels inplace instead of creating a new map.