change NumCtxSwitchesStat fields to int64
This commit is contained in:
parent
5a0ed0e6df
commit
9e3563f8ca
|
@ -38,8 +38,8 @@ type IOCountersStat struct {
|
|||
}
|
||||
|
||||
type NumCtxSwitchesStat struct {
|
||||
Voluntary int32 `json:"voluntary"`
|
||||
Involuntary int32 `json:"involuntary"`
|
||||
Voluntary int64 `json:"voluntary"`
|
||||
Involuntary int64 `json:"involuntary"`
|
||||
}
|
||||
|
||||
func (p Process) String() string {
|
||||
|
|
|
@ -430,17 +430,17 @@ func (p *Process) fillFromStatus() error {
|
|||
}
|
||||
p.numThreads = int32(v)
|
||||
case "voluntary_ctxt_switches":
|
||||
v, err := strconv.ParseInt(value, 10, 32)
|
||||
v, err := strconv.ParseInt(value, 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
p.numCtxSwitches.Voluntary = int32(v)
|
||||
p.numCtxSwitches.Voluntary = v
|
||||
case "nonvoluntary_ctxt_switches":
|
||||
v, err := strconv.ParseInt(value, 10, 32)
|
||||
v, err := strconv.ParseInt(value, 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
p.numCtxSwitches.Involuntary = int32(v)
|
||||
p.numCtxSwitches.Involuntary = v
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue