diff options
| author | Carlos Amedee <carlos@golang.org> | 2024-05-07 10:37:48 -0400 |
|---|---|---|
| committer | Carlos Amedee <carlos@golang.org> | 2024-05-17 17:15:58 +0000 |
| commit | 01ad44bc08c7ea3b8a7d1d989051046c77b6a63d (patch) | |
| tree | 95f13942c0060668b197f4f84dda287914e4dbe6 /src/cmd/trace/annotations_test.go | |
| parent | 003683f41d667c8942657d6fd8bbf9e7c6925c87 (diff) | |
| download | go-01ad44bc08c7ea3b8a7d1d989051046c77b6a63d.tar.xz | |
cmd/trace: collapse v2 directory into trace
This change removes the old trace code and replaces it with the new tracer.
It does the following:
- Moves the contents of the v2 directory into the parent trace directory.
- Combines the old tracer main file with the new main file.
- Replaces any existing files with the corresponding v2 files.
- Removes any unused files.
Updates #67367
Change-Id: I2237920e13588258a2442b639d562cf7f8a8e944
Reviewed-on: https://go-review.googlesource.com/c/go/+/584536
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/cmd/trace/annotations_test.go')
| -rw-r--r-- | src/cmd/trace/annotations_test.go | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/cmd/trace/annotations_test.go b/src/cmd/trace/annotations_test.go deleted file mode 100644 index 5585e485f7..0000000000 --- a/src/cmd/trace/annotations_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !js - -package main - -import ( - "testing" - "time" -) - -func TestOverlappingDuration(t *testing.T) { - cases := []struct { - start0, end0, start1, end1 int64 - want time.Duration - }{ - { - 1, 10, 11, 20, 0, - }, - { - 1, 10, 5, 20, 5 * time.Nanosecond, - }, - { - 1, 10, 2, 8, 6 * time.Nanosecond, - }, - } - - for _, tc := range cases { - s0, e0, s1, e1 := tc.start0, tc.end0, tc.start1, tc.end1 - if got := overlappingDuration(s0, e0, s1, e1); got != tc.want { - t.Errorf("overlappingDuration(%d, %d, %d, %d)=%v; want %v", s0, e0, s1, e1, got, tc.want) - } - if got := overlappingDuration(s1, e1, s0, e0); got != tc.want { - t.Errorf("overlappingDuration(%d, %d, %d, %d)=%v; want %v", s1, e1, s0, e0, got, tc.want) - } - } -} |
