microsoft / Microsoft-Performance-Tools-Linux-Android

Linux, Android and Chromium Performance Tools built using the Microsoft Performance Toolkit. Cross-platform .NET Core + WPA GUI
MIT License
320 stars 34 forks source link

Perfetto plugin - Added coarse CPU usage graph based on /proc/stat CPU counters #34

Closed KyleStorck closed 3 years ago

KyleStorck commented 3 years ago

With the STAT_CPU_TIMES config option, CPU counter events are captured based on counter values from the /proc/stat file. At regular interval through the trace, multiple CPU counter events (user, user_nice, system, IO, interrupts, softIRQ, idle) are recorded. By looking at the change of these counter values from one event to the next, you can graph CPU usage percentage for each category. Added separate table to graph all these CPU counters.

image

data_sources: { config { name: "linux.sys_stats" sys_stats_config { stat_period_ms: 1000 stat_counters: STAT_CPU_TIMES stat_counters: STAT_FORK_COUNT } } }