From 01ad44bc08c7ea3b8a7d1d989051046c77b6a63d Mon Sep 17 00:00:00 2001 From: Carlos Amedee Date: Tue, 7 May 2024 10:37:48 -0400 Subject: 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 Reviewed-by: Michael Knyszek --- src/cmd/trace/annotations_test.go | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/cmd/trace/annotations_test.go (limited to 'src/cmd/trace/annotations_test.go') 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) - } - } -} -- cgit v1.3-6-g1900