diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2023-11-14 03:38:04 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2023-11-21 21:29:09 +0000 |
| commit | 71052169be2d4de14f2e93ea6ba9811b54434bc3 (patch) | |
| tree | d6b004db04b440870558508940128db7d8865758 /src/internal/trace | |
| parent | 7e32d8d10b3a8d29165415437ffcc210f914b7cc (diff) | |
| download | go-71052169be2d4de14f2e93ea6ba9811b54434bc3.tar.xz | |
cmd/trace/v2: add support for task and region endpoints
This change fills out the last of cmd/trace's subpages for v2 traces by
adding support for task and region endpoints.
For #60773.
For #63960.
Change-Id: Ifc4c660514b3904788785a1b20e3abc3bb9e55f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/542077
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/internal/trace')
| -rw-r--r-- | src/internal/trace/summary.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/internal/trace/summary.go b/src/internal/trace/summary.go index f57146e950..934a980c7c 100644 --- a/src/internal/trace/summary.go +++ b/src/internal/trace/summary.go @@ -64,6 +64,12 @@ type UserTaskSummary struct { Goroutines map[tracev2.GoID]*GoroutineSummary } +// Complete returns true if we have complete information about the task +// from the trace: both a start and an end. +func (s *UserTaskSummary) Complete() bool { + return s.Start != nil && s.End != nil +} + // UserRegionSummary represents a region and goroutine execution stats // while the region was active. (For v2 traces.) type UserRegionSummary struct { |
