Merge "Use Sec as well as Usec in ProcResInfo"

This commit is contained in:
Treehugger Robot
2023-03-10 22:19:33 +00:00
committed by Gerrit Code Review

View File

@@ -135,8 +135,8 @@ func (t *EventTracer) AddProcResInfo(name string, state *os.ProcessState) {
e := t.peek()
e.procResInfo = append(e.procResInfo, &soong_metrics_proto.ProcessResourceInfo{
Name: proto.String(name),
UserTimeMicros: proto.Uint64(uint64(rusage.Utime.Usec)),
SystemTimeMicros: proto.Uint64(uint64(rusage.Stime.Usec)),
UserTimeMicros: proto.Uint64(uint64(state.UserTime().Microseconds())),
SystemTimeMicros: proto.Uint64(uint64(state.SystemTime().Microseconds())),
MinorPageFaults: proto.Uint64(uint64(rusage.Minflt)),
MajorPageFaults: proto.Uint64(uint64(rusage.Majflt)),
// ru_inblock and ru_oublock are measured in blocks of 512 bytes.