Skip to content

fix(metering): skip empty metrics and avoid emitting empty aggregates#9786

Merged
ti-chi-bot[bot] merged 1 commit intotikv:masterfrom
JmPotato:filter_zero_dfs
Sep 29, 2025
Merged

fix(metering): skip empty metrics and avoid emitting empty aggregates#9786
ti-chi-bot[bot] merged 1 commit intotikv:masterfrom
JmPotato:filter_zero_dfs

Conversation

@JmPotato
Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: ref #9707.

What is changed and how does it work?

- In `ruCollector.Aggregate` and `dfsStatsCollector.Aggregate`, return `nil` instead of an empty list when no metrics are available.
- Updated `dfsStatsCollector.Collect` to ignore entries with no written bytes and no write requests, preventing unnecessary data collection.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels Sep 29, 2025
@JmPotato JmPotato added the nextgen Indicates that the Issue or PR belongs to the nextgen kernel architecture. label Sep 29, 2025
@ti-chi-bot ti-chi-bot bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 29, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Sep 29, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 29, 2025

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.83%. Comparing base (f8ab6e5) to head (b44d45c).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9786      +/-   ##
==========================================
+ Coverage   76.75%   76.83%   +0.08%     
==========================================
  Files         490      491       +1     
  Lines       78166    78466     +300     
==========================================
+ Hits        59994    60293     +299     
+ Misses      14499    14496       -3     
- Partials     3673     3677       +4     
Flag Coverage Δ
unittests 76.83% <44.44%> (+0.08%) ⬆️

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

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

@ti-chi-bot ti-chi-bot bot added the lgtm label Sep 29, 2025
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Sep 29, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: okJiang, rleungx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 29, 2025
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Sep 29, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-09-29 02:49:18.73442397 +0000 UTC m=+52938.991155370: ☑️ agreed by rleungx.
  • 2025-09-29 02:56:55.231146945 +0000 UTC m=+53395.487878345: ☑️ agreed by okJiang.

@ti-chi-bot ti-chi-bot bot merged commit e30504e into tikv:master Sep 29, 2025
27 of 30 checks passed
@JmPotato JmPotato deleted the filter_zero_dfs branch September 29, 2025 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm nextgen Indicates that the Issue or PR belongs to the nextgen kernel architecture. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants