diff options
author | 2023-03-06 11:44:45 +0900 | |
---|---|---|
committer | 2023-03-06 11:44:45 +0900 | |
commit | bd465cca8a35729e5f4a89432015bb5bd24ad790 (patch) | |
tree | 0bf8a789c6b89d1c04e3928386c7cd759bd6125d | |
parent | ba3a44dd1ceb1f10215a091ee89c23891c57f65a (diff) |
Use Sec as well as Usec in ProcResInfo
Timeval has two fields: Sec and Usec, but in previous implementation, it
only uses Usec, so Sec data is abandoned.
Bug: 271526845
Test: check metric, and if seconds data is reserved.
Change-Id: I911467f77b41995f6c833099648fe62fbc9909eb
-rw-r--r-- | ui/metrics/event.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/metrics/event.go b/ui/metrics/event.go index b3a027ea0..cbdeb2789 100644 --- a/ui/metrics/event.go +++ b/ui/metrics/event.go @@ -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. |