Skip to content

Refactor pgsmQueryStats structure - #841

Open
artemgavrilov wants to merge 2 commits into
mainfrom
flatten-stats
Open

artemgavrilov wants to merge 2 commits into
mainfrom
flatten-stats

Conversation

@artemgavrilov

@artemgavrilov artemgavrilov commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Keep in pgsmQueryStats structure only what's needed. That reduces struct size and decouples it from Counters structure as they have different needs. Next step will be rework how we count things there.

Intstead of storing whole Counters structure in in pgsmQueryStats keep
only what's needed. That reduces size of entries that we store in the
list. Also local statisctics can be stored differently rather that final
entry.
Remove ErrorInfo from pgsmQueryStats and pass it directly to pgsm_store.
That will reduce memory pgsmQueryStats need and also simplifies logic.
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.93878% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.54%. Comparing base (cd866ff) to head (aaa08d2).

Files with missing lines Patch % Lines
src/pg_stat_monitor.c 96.93% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #841      +/-   ##
==========================================
+ Coverage   88.50%   88.54%   +0.04%     
==========================================
  Files           3        3              
  Lines        1340     1336       -4     
  Branches      196      196              
==========================================
- Hits         1186     1183       -3     
  Misses         75       75              
+ Partials       79       78       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@artemgavrilov artemgavrilov changed the title Flatten stats Refactor pgsmQueryStats structure Sep 7, 2026
@artemgavrilov
artemgavrilov marked this pull request as ready for review September 7, 2026 21:51
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.

1 participant