• Hana Kim's avatar
    cmd/trace: distinguish task endTimestamp and lastTimestamp · 011f6c5f
    Hana Kim authored
    A task may have other user annotation events after the task ends.
    So far, task.lastTimestamp returned the task end event if the
    event available. This change introduces task.endTimestamp for that
    and makes task.lastTimestamp returns the "last" seen event's timestamp
    if the task is ended.
    
    If the task is not ended, both returns the last timestamp of the entire
    trace assuming the task is still active.
    
    This fixes the task-oriented trace view mode not to drop user
    annotation instances when they appear outside a task's lifespan.
    Adds a test.
    
    Change-Id: Iba1062914f224edd521b9ee55c6cd5e180e55359
    Reviewed-on: https://go-review.googlesource.com/109175Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
    011f6c5f
trace_test.go 7.33 KB