Skip to content

Conversation

@janisz
Copy link
Contributor

@janisz janisz commented Oct 30, 2025

Description

This PR measures max heap bytes and objects in alert upsert benchmark.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Oct 30, 2025

Images are ready for the commit at 847d887.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.10.x-201-g847d8876b4.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.73%. Comparing base (4a68181) to head (847d887).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #17564   +/-   ##
=======================================
  Coverage   48.72%   48.73%           
=======================================
  Files        2728     2728           
  Lines      203127   203127           
=======================================
+ Hits        98980    98989    +9     
+ Misses      96399    96391    -8     
+ Partials     7748     7747    -1     
Flag Coverage Δ
go-unit-tests 48.73% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 50 to 53
runtime.GC()
runtime.ReadMemStats(&m)
maxHeap = max(maxHeap, m.HeapAlloc)
maxHeapObj = max(maxHeap, m.HeapObjects)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make sure this set of steps has run once and the metrics have been collected as baseline before you move on to running the benchmark loop ?

Signed-off-by: Tomasz Janiszewski <[email protected]>
@janisz janisz requested a review from vikin91 October 30, 2025 15:06
Comment on lines +61 to +62
b.ReportMetric(float64(maxHeap-startHeap), "max_heap_bytes")
b.ReportMetric(float64(maxHeapObj-startHeapObj), "max_heap_objects")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but maybe consider also printing the startHeap and startHeapObj separately for reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check that as I remember logging in benchmark breaks benchstat

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check that as I remember logging in benchmark breaks benchstat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants