blob: aafdba391af2057d6d17d4b3d609d37ef1a4d943 [file] [log] [blame]
James Kuszmaul418fd062022-03-22 15:22:27 -07001namespace aos.util;
2
3// ProcessInfo captures state information associated with a given process.
4table ProcessInfo {
5 // Process ID of the process in question.
6 pid: uint (id: 0);
7 // Name of the running executable.
8 name: string (id: 1);
9 // Time that the process spent executing over the past ~1 second, divided by
10 // the amount of wall-clock time that elapsed in that period. I.e., if a process is
11 // consuming all of one CPU core then this would be 1.0. Multi-threaded processes
12 // can exceed 1.0.
13 cpu_usage: float (id: 2);
14 // Amount of physical RAM taken by this process, in bytes. Will be a multiple of the
15 // system's page size.
16 physical_memory: uint64 (id: 3);
17}
18
19table TopProcessesFbs {
20 // List of processes consuming the most CPU in the last sample period, in order from
21 // most CPU to least.
22 processes: [ProcessInfo] (id: 0);
23}