Skip to content

Commit 3eaadcd

Browse files
thomasbarrettThomas Barrett
authored andcommitted
Add support for gtime and cgtime stats. (prometheus#597)
Signed-off-by: Thomas Barrett <[email protected]> Co-authored-by: Thomas Barrett <[email protected]>
1 parent 1b7c641 commit 3eaadcd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

proc_stat.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ type ProcStat struct {
110110
Policy uint
111111
// Aggregated block I/O delays, measured in clock ticks (centiseconds).
112112
DelayAcctBlkIOTicks uint64
113+
// Guest time of the process (time spent running a virtual CPU for a guest
114+
// operating system), measured in clock ticks.
115+
GuestTime int
116+
// Guest time of the process's children, measured in clock ticks.
117+
CGuestTime int
113118

114119
proc FS
115120
}
@@ -189,6 +194,8 @@ func (p Proc) Stat() (ProcStat, error) {
189194
&s.RTPriority,
190195
&s.Policy,
191196
&s.DelayAcctBlkIOTicks,
197+
&s.GuestTime,
198+
&s.CGuestTime,
192199
)
193200
if err != nil {
194201
return ProcStat{}, err

0 commit comments

Comments
 (0)