apache / apache/brpc

process_cpu_usage 用户代码获取不准确问题

Open
#2,386 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Describe the bug (描述bug)**
通过如下代码获取
bvar::Variable::describe_exposed("process_cpu_usage");

获取到的 process_cpu_usage 与 brpc 内部监控页面获取的数值不一致且有延迟,请问是我使用的方式不对吗?

**To Reproduce (复现方法)**

**Expected behavior (期望行为)**

**Versions (各种版本)**
OS:
Compiler:
brpc:
protobuf:

**Additional context/screenshots (更多上下文/截图)**

Contributor guide

Open the contributing guide

Research direction

Start with bvar::Variable::describe_exposed("process_cpu_usage") and compare its result with the value shown in brpc’s internal monitoring page. Reproduce the reported mismatch and delay, then trace how both values are obtained. Done means the cause of the discrepancy is identified and the exposed value matches the documented expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.