sahildevgon commented on code in PR #60777:
URL: https://github.com/apache/doris/pull/60777#discussion_r2945867750


##########
fe/fe-core/src/main/java/org/apache/doris/metric/SystemMetrics.java:
##########
@@ -54,10 +56,72 @@ public class SystemMetrics {
     protected long buffers = 0;
     // Memory in the pagecache (Diskcache and Shared Memory)
     protected long cached = 0;
+    // CPU time metrics (in USER_HZ, typically 1/100th of a second)
+    // Time spent in user mode
+    protected long cpuUser = 0;
+    // Time spent in user mode with low priority (nice)
+    protected long cpuNice = 0;
+    // Time spent in system/kernel mode
+    protected long cpuSystem = 0;
+    // Time spent idle
+    protected long cpuIdle = 0;
+    // Time waiting for I/O to complete
+    protected long cpuIowait = 0;
+    // Time servicing hardware interrupts
+    protected long cpuIrq = 0;
+    // Time servicing software interrupts
+    protected long cpuSoftirq = 0;
+    // Time stolen by hypervisor (for VMs)
+    protected long cpuSteal = 0;
+    // Time spent running virtual CPU for guest OS
+    protected long cpuGuest = 0;
+    // Time spent running niced guest
+    protected long cpuGuestNice = 0;
+
+    // Package-private: allows tests to override the /proc/stat resource path
+    String cpuStatTestFile = "data/stat_normal";
+

Review Comment:
   added a protected method for path(Overridable in tests)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to