Skip to content

[enhance](meta-service)add bvar for fdb process status - #52882

Merged
gavinchou merged 7 commits into
apache:masterfrom
koarz:fdb_io_metric
Jul 11, 2025
Merged

[enhance](meta-service)add bvar for fdb process status#52882
gavinchou merged 7 commits into
apache:masterfrom
koarz:fdb_io_metric

Conversation

@koarz

@koarzkoarz commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

g_bvar_fdb_process_status_int,g_bvar_fdb_process_status_float these two mBvars show the process status from fdb_status

this pr handle these metric

"processes":{
"09ca90b9f3f413e5816b2610ed8b465d":{
..."cpu":{
"usage_cores":0.0012292
},
"disk":{
"busy":0.0085999800000000001,
"free_bytes":490412584960,
"reads":{
"counter":854857,
"hz":0,
"sectors":0
},
"total_bytes":527295578112,
"writes":{
"counter":73765457,
"hz":26.1999,
"sectors":1336
}
},
..."memory":{
"available_bytes":3065090867,
"limit_bytes":8589934592,
"rss_bytes":46551040,
"unused_allocated_memory":655360,
"used_bytes":122974208
},
...
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="memory",metric="available_bytes"} 1073741824
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="writes_counter"} 117339905
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="memory",metric="used_bytes"} 213848064
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="reads_counter"} 19812058
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="memory",metric="rss_bytes"} 60182528
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="memory",metric="unused_allocated_memory"} 0
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="memory",metric="limit_bytes"} 1073741824
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="writes_sectors"} 225616
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="reads_sectors"} 58888
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="free_bytes"} 189571883008
# HELP fdb_process_status_int
# TYPE fdb_process_status_int gauge
fdb_process_status_int{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="total_bytes"} 471412600832
...
# HELP fdb_process_status_float
# TYPE fdb_process_status_float gauge
fdb_process_status_float{process_id="16fb8a9e8dd5098537e422554fa51b70",component="cpu",metric="usage_cores"} 0.0155129
# HELP fdb_process_status_float
# TYPE fdb_process_status_float gauge
fdb_process_status_float{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="busy"} 0.353599
# HELP fdb_process_status_float
# TYPE fdb_process_status_float gauge
fdb_process_status_float{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="writes_hz"} 325.399
# HELP fdb_process_status_float
# TYPE fdb_process_status_float gauge
fdb_process_status_float{process_id="16fb8a9e8dd5098537e422554fa51b70",component="disk",metric="reads_hz"} 321.399

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@koarz

koarz commented Jul 7, 2025

Copy link
Copy Markdown
ContributorAuthor

run buildall

@koarz

koarz commented Jul 7, 2025

Copy link
Copy Markdown
ContributorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 100.00% (59/59) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage83.09% (1228/1478)
Line Coverage67.71% (21328/31501)
Region Coverage67.30% (10567/15702)
Branch Coverage56.67% (5562/9814)

@koarz

koarz commented Jul 9, 2025

Copy link
Copy Markdown
ContributorAuthor

run buildall

@koarz

koarz commented Jul 9, 2025

Copy link
Copy Markdown
ContributorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 100.00% (50/50) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage80.65% (1259/1561)
Line Coverage68.01% (21571/31719)
Region Coverage67.29% (10632/15801)
Branch Coverage56.84% (5585/9826)

Comment threadcloud/src/common/metric.cpp
@koarz

Copy link
Copy Markdown
ContributorAuthor

run cloudut

@koarz

Copy link
Copy Markdown
ContributorAuthor

run buildall

@doris-robot

Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 94.12% (48/51) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage80.65% (1259/1561)
Line Coverage67.94% (21553/31722)
Region Coverage67.24% (10626/15802)
Branch Coverage56.78% (5579/9826)

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jul 11, 2025
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@gavinchou
gavinchou merged commit 25638e6 into apache:masterJul 11, 2025
@koarz
koarz deleted the fdb_io_metric branch July 11, 2025 06:19
dataroaring pushed a commit that referenced this pull request Jul 11, 2025
…2882 (#53100)
Cherry-picked from #52882
Co-authored-by: koarz <lihao@selectdb.com>
morrySnow pushed a commit that referenced this pull request Jul 11, 2025
…2882 (#53101)
Cherry-picked from #52882
Co-authored-by: koarz <lihao@selectdb.com>
@gavinchougavinchou mentioned this pull request Aug 15, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.clouddev/3.0.7-mergeddev/3.1.0-mergedreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@koarz@Thearas@hello-stephen@doris-robot@gavinchou@pingchunzhang@dataroaring@morrySnow