diff --git a/internal/profile/android.go b/internal/profile/android.go index 0ec8bad..8711a48 100644 --- a/internal/profile/android.go +++ b/internal/profile/android.go @@ -155,11 +155,12 @@ type AndroidEvent struct { type ( Android struct { - Clock Clock `json:"clock"` - Events []AndroidEvent `json:"events,omitempty"` - Methods []AndroidMethod `json:"methods,omitempty"` - StartTime uint64 `json:"start_time,omitempty"` - Threads []AndroidThread `json:"threads,omitempty"` + Clock Clock `json:"clock"` + ElapsedTime uint64 `json:"elapsed_time,omitempty"` + Events []AndroidEvent `json:"events,omitempty"` + Methods []AndroidMethod `json:"methods,omitempty"` + StartTime uint64 `json:"start_time,omitempty"` + Threads []AndroidThread `json:"threads,omitempty"` } Clock string @@ -361,10 +362,7 @@ func (p Android) DurationNS() uint64 { if len(p.Events) == 0 { return 0 } - buildTimestamp := p.TimestampGetter() - startTS := buildTimestamp(p.Events[0].Time) - endTS := buildTimestamp(p.Events[len(p.Events)-1].Time) - return endTS - startTS + return p.ElapsedTime } func generateFingerprint(stack []*nodetree.Node) uint64 {