Skip to content

Conversation

@JacksonYao287
Copy link
Collaborator

@JacksonYao287 JacksonYao287 commented Jan 20, 2026

add two metrics for gc:
gc_read_blk_count : total read blk count in this pdev issued by gc
gc_write_blk_count : total write blk count in this pdev issued by gc

these two metrics are not persisted, which means they will start from 0 if sm restarts

@JacksonYao287 JacksonYao287 force-pushed the add-blk-metrics-for-gc branch 2 times, most recently from d6e600a to a182180 Compare January 21, 2026 07:05
@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.46%. Comparing base (1746bcc) to head (43aae12).
⚠️ Report is 146 commits behind head on main.

Files with missing lines Patch % Lines
...ib/homestore_backend/replication_state_machine.cpp 0.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
- Coverage   63.15%   55.46%   -7.70%     
==========================================
  Files          32       35       +3     
  Lines        1900     4875    +2975     
  Branches      204      613     +409     
==========================================
+ Hits         1200     2704    +1504     
- Misses        600     1886    +1286     
- Partials      100      285     +185     

☔ View full report in Codecov by Sentry.
📢 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.

@JacksonYao287 JacksonYao287 force-pushed the add-blk-metrics-for-gc branch from a182180 to b1325fb Compare January 21, 2026 09:22
REGISTER_GAUGE(failed_egc_task_count, "Number of failed emergent gc tasks");
REGISTER_GAUGE(total_reclaimed_space_by_gc, "Total reclaimed space by gc task");
REGISTER_GAUGE(total_reclaimed_space_by_egc, "Total reclaimed space by emergent gc task");
REGISTER_GAUGE(gc_read_blk_count, "Total read blk count by gc in this pdev");
Copy link
Collaborator

Choose a reason for hiding this comment

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

use REGISTER_COUNTER, then you can use COUNTER_INC(gc_read_blk_count, new_pba.blk_count()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks , done

Copy link
Collaborator

Choose a reason for hiding this comment

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

Some of other metrics like failed_egc_task_count can be moved to counter as well, but it can be done seperately.

xiaoxichen
xiaoxichen previously approved these changes Jan 21, 2026
REGISTER_GAUGE(total_reclaimed_space_by_gc, "Total reclaimed space by gc task");
REGISTER_GAUGE(total_reclaimed_space_by_egc, "Total reclaimed space by emergent gc task");
REGISTER_COUNTER(gc_read_blk_count, "Total read blk count by gc in this pdev");
REGISTER_COUNTER(gc_write_blk_count, "Total writted blk count by gc in this pdev");
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/writted/written

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done , thanks

@JacksonYao287 JacksonYao287 force-pushed the add-blk-metrics-for-gc branch from 4241bd5 to 43aae12 Compare January 22, 2026 00:13
@JacksonYao287 JacksonYao287 merged commit 6822380 into eBay:main Jan 22, 2026
25 checks passed
@JacksonYao287 JacksonYao287 deleted the add-blk-metrics-for-gc branch January 22, 2026 01:29
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.

3 participants