[go] internal/trace: add Go 1.19 test data

49 views
Skip to first unread message

Rhys Hiltner (Gerrit)

unread,
Jun 23, 2022, 1:41:36 PM6/23/22
to goph...@pubsubhelper.golang.org, Rhys Hiltner, golang-co...@googlegroups.com

Rhys Hiltner has uploaded this change for review.

View Change

internal/trace: add Go 1.19 test data

Update instructions to match what seems to be the historical practice:
to generate canned traces when a version is finalized, rather than
waiting until it is superseded.

Follow rename of trace-internal tests from "Span" to "Region". Update
the net/http test invocation to match the apparent intent and the actual
http_1_5_good behavior (about 7ms of total run time and trace file size
under 50kB).

Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
---
M src/internal/trace/mkcanned.bash
M src/internal/trace/parser.go
A src/internal/trace/testdata/http_1_19_good
A src/internal/trace/testdata/stress_1_19_good
A src/internal/trace/testdata/stress_start_stop_1_19_good
R src/internal/trace/testdata/user_task_region_1_11_good
A src/internal/trace/testdata/user_task_region_1_19_good
7 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/src/internal/trace/mkcanned.bash b/src/internal/trace/mkcanned.bash
index b365b90..879cf1c 100755
--- a/src/internal/trace/mkcanned.bash
+++ b/src/internal/trace/mkcanned.bash
@@ -13,8 +13,8 @@
exit 1
fi

-go test -run ClientServerParallel4 -trace "testdata/http_$1_good" net/http
-go test -run 'TraceStress$|TraceStressStartStop$|TestUserTaskSpan$' runtime/trace -savetraces
+go test -run '^$' -bench ClientServerParallel4 -benchtime 10x -trace "testdata/http_$1_good" net/http
+go test -run 'TraceStress$|TraceStressStartStop$|TestUserTaskRegion$' runtime/trace -savetraces
mv ../../runtime/trace/TestTraceStress.trace "testdata/stress_$1_good"
mv ../../runtime/trace/TestTraceStressStartStop.trace "testdata/stress_start_stop_$1_good"
-mv ../../runtime/trace/TestUserTaskSpan.trace "testdata/user_task_span_$1_good"
+mv ../../runtime/trace/TestUserTaskRegion.trace "testdata/user_task_region_$1_good"
diff --git a/src/internal/trace/parser.go b/src/internal/trace/parser.go
index 8c74196..866fe8c 100644
--- a/src/internal/trace/parser.go
+++ b/src/internal/trace/parser.go
@@ -152,8 +152,8 @@
}
switch ver {
case 1005, 1007, 1008, 1009, 1010, 1011, 1019:
- // Note: When adding a new version, add canned traces
- // from the old version to the test suite using mkcanned.bash.
+ // Note: When adding a new version, confirm that canned traces from the
+ // old version are part of the test suite. Add them using mkcanned.bash.
break
default:
err = fmt.Errorf("unsupported trace file version %v.%v (update Go toolchain) %v", ver/1000, ver%1000, ver)
diff --git a/src/internal/trace/testdata/http_1_19_good b/src/internal/trace/testdata/http_1_19_good
new file mode 100644
index 0000000..c1d519e
--- /dev/null
+++ b/src/internal/trace/testdata/http_1_19_good
Binary files differ
diff --git a/src/internal/trace/testdata/stress_1_19_good b/src/internal/trace/testdata/stress_1_19_good
new file mode 100644
index 0000000..13f59268
--- /dev/null
+++ b/src/internal/trace/testdata/stress_1_19_good
Binary files differ
diff --git a/src/internal/trace/testdata/stress_start_stop_1_19_good b/src/internal/trace/testdata/stress_start_stop_1_19_good
new file mode 100644
index 0000000..92d9278
--- /dev/null
+++ b/src/internal/trace/testdata/stress_start_stop_1_19_good
Binary files differ
diff --git a/src/internal/trace/testdata/user_task_span_1_11_good b/src/internal/trace/testdata/user_task_region_1_11_good
similarity index 100%
rename from src/internal/trace/testdata/user_task_span_1_11_good
rename to src/internal/trace/testdata/user_task_region_1_11_good
Binary files differ
diff --git a/src/internal/trace/testdata/user_task_region_1_19_good b/src/internal/trace/testdata/user_task_region_1_19_good
new file mode 100644
index 0000000..1daa3b2
--- /dev/null
+++ b/src/internal/trace/testdata/user_task_region_1_19_good
Binary files differ

To view, visit change 413776. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
Gerrit-Change-Number: 413776
Gerrit-PatchSet: 1
Gerrit-Owner: Rhys Hiltner <rh...@justin.tv>
Gerrit-Reviewer: Rhys Hiltner <rh...@justin.tv>
Gerrit-MessageType: newchange

Rhys Hiltner (Gerrit)

unread,
Jun 23, 2022, 2:27:44 PM6/23/22
to Rhys Hiltner, goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

View Change

1 comment:

  • Patchset:

    • Patch Set #1:

      1 of 31 TryBots failed. […]

      That's a timeout in go_test:internal/poll. I don't see how it would be related to my change, I'm going to re-run the trybots.

To view, visit change 413776. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
Gerrit-Change-Number: 413776
Gerrit-PatchSet: 1
Gerrit-Owner: Rhys Hiltner <rh...@justin.tv>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Rhys Hiltner <rh...@justin.tv>
Gerrit-Comment-Date: Thu, 23 Jun 2022 18:27:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Gopher Robot <go...@golang.org>
Gerrit-MessageType: comment

Rhys Hiltner (Gerrit)

unread,
Jun 23, 2022, 2:28:23 PM6/23/22
to Rhys Hiltner, goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

Rhys Hiltner removed a vote from this change.

View Change

Removed TryBot-Result-1 by Gopher Robot <go...@golang.org>

To view, visit change 413776. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
Gerrit-Change-Number: 413776
Gerrit-PatchSet: 2
Gerrit-Owner: Rhys Hiltner <rh...@justin.tv>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Rhys Hiltner <rh...@justin.tv>
Gerrit-MessageType: deleteVote

Rhys Hiltner (Gerrit)

unread,
Jun 23, 2022, 2:28:31 PM6/23/22
to Rhys Hiltner, goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

Rhys Hiltner removed a vote from this change.

View Change

Removed -TryBot-Result by Gopher Robot <go...@golang.org>

Rhys Hiltner (Gerrit)

unread,
Jun 23, 2022, 3:14:10 PM6/23/22
to Rhys Hiltner, goph...@pubsubhelper.golang.org, Michael Knyszek, Michael Pratt, Gopher Robot, golang-co...@googlegroups.com

Attention is currently required from: Michael Knyszek.

View Change

2 comments:

  • Patchset:

    • Patch Set #1:

      That's a timeout in go_test:internal/poll. […]

      The re-run succeeded, but did not resolve this comment.

  • Patchset:

    • Patch Set #2:

      Hi Michael K, this adds canned traces for the current file format version (1.19). It looks like for the past few version changes (1.11, 1.10, 1.9), the canned traces have been committed immediately rather than waiting until that version is superseded.

To view, visit change 413776. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
Gerrit-Change-Number: 413776
Gerrit-PatchSet: 2
Gerrit-Owner: Rhys Hiltner <rh...@justin.tv>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Reviewer: Rhys Hiltner <rh...@justin.tv>
Gerrit-CC: Michael Pratt <mpr...@google.com>
Gerrit-Attention: Michael Knyszek <mkny...@google.com>
Gerrit-Comment-Date: Thu, 23 Jun 2022 19:14:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Gopher Robot <go...@golang.org>
Comment-In-Reply-To: Rhys Hiltner <rh...@justin.tv>
Gerrit-MessageType: comment

Michael Pratt (Gerrit)

unread,
Jun 23, 2022, 3:21:09 PM6/23/22
to Rhys Hiltner, goph...@pubsubhelper.golang.org, Michael Pratt, Michael Knyszek, Gopher Robot, golang-co...@googlegroups.com

Attention is currently required from: Michael Knyszek, Rhys Hiltner.

Patch set 2:Code-Review +2

View Change

    To view, visit change 413776. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
    Gerrit-Change-Number: 413776
    Gerrit-PatchSet: 2
    Gerrit-Owner: Rhys Hiltner <rh...@justin.tv>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
    Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
    Gerrit-Reviewer: Rhys Hiltner <rh...@justin.tv>
    Gerrit-Attention: Michael Knyszek <mkny...@google.com>
    Gerrit-Attention: Rhys Hiltner <rh...@justin.tv>
    Gerrit-Comment-Date: Thu, 23 Jun 2022 19:21:05 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Carlos Amedee (Gerrit)

    unread,
    Jun 24, 2022, 5:54:22 PM6/24/22
    to Rhys Hiltner, goph...@pubsubhelper.golang.org, Michael Pratt, Michael Knyszek, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Michael Knyszek, Rhys Hiltner.

    Patch set 2:Code-Review +1

    View Change

      To view, visit change 413776. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
      Gerrit-Change-Number: 413776
      Gerrit-PatchSet: 2
      Gerrit-Owner: Rhys Hiltner <rh...@justin.tv>
      Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
      Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
      Gerrit-Reviewer: Rhys Hiltner <rh...@justin.tv>
      Gerrit-Attention: Michael Knyszek <mkny...@google.com>
      Gerrit-Attention: Rhys Hiltner <rh...@justin.tv>
      Gerrit-Comment-Date: Fri, 24 Jun 2022 21:54:18 +0000

      Rhys Hiltner (Gerrit)

      unread,
      Jun 24, 2022, 6:08:21 PM6/24/22
      to Rhys Hiltner, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Carlos Amedee, Michael Pratt, Michael Knyszek, Gopher Robot, golang-co...@googlegroups.com

      Rhys Hiltner submitted this change.

      View Change


      Approvals: Rhys Hiltner: Run TryBots Carlos Amedee: Looks good to me, but someone else must approve Michael Pratt: Looks good to me, approved Gopher Robot: TryBots succeeded
      internal/trace: add Go 1.19 test data

      Update instructions to match what seems to be the historical practice:
      to generate canned traces when a version is finalized, rather than
      waiting until it is superseded.

      Follow rename of trace-internal tests from "Span" to "Region". Update
      the net/http test invocation to match the apparent intent and the actual
      http_1_5_good behavior (about 7ms of total run time and trace file size
      under 50kB).

      Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
      Reviewed-on: https://go-review.googlesource.com/c/go/+/413776
      Run-TryBot: Rhys Hiltner <rh...@justin.tv>
      Reviewed-by: Carlos Amedee <car...@golang.org>
      TryBot-Result: Gopher Robot <go...@golang.org>
      Reviewed-by: Michael Pratt <mpr...@google.com>

      ---
      M src/internal/trace/mkcanned.bash
      M src/internal/trace/parser.go
      A src/internal/trace/testdata/http_1_19_good
      A src/internal/trace/testdata/stress_1_19_good
      A src/internal/trace/testdata/stress_start_stop_1_19_good
      R src/internal/trace/testdata/user_task_region_1_11_good
      A src/internal/trace/testdata/user_task_region_1_19_good
      7 files changed, 28 insertions(+), 5 deletions(-)

      To view, visit change 413776. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ifd4c85882159478852e0b8f0d771b6f16b8f3c1b
      Gerrit-Change-Number: 413776
      Gerrit-PatchSet: 3
      Gerrit-Owner: Rhys Hiltner <rh...@justin.tv>
      Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
      Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
      Gerrit-Reviewer: Rhys Hiltner <rh...@justin.tv>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages