]> Cypherpunks repositories - gostls13.git/commitdiff
internal/trace: use RFC3339Nano for wall clock snapshots in Event.String
authorFelix Geisendörfer <felix.geisendoerfer@datadoghq.com>
Tue, 19 Aug 2025 14:51:39 +0000 (16:51 +0200)
committerGopher Robot <gobot@golang.org>
Tue, 19 Aug 2025 19:37:54 +0000 (12:37 -0700)
Improve the quality of life for people who use go tool trace -d=parsed
to look at clock snapshot wall timestamps. Many use cases will benefit
from seing the timestamp in sub-second resolution.

Change-Id: I6a6a696403a2164db0c12789c764e22a5c519b1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/697355
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/internal/trace/event.go

index 0204c2b5f525dd36d31f2cee8e928ac532f5a60f..a47f71b65e70f5e6fa570e2fa3ebb658143fff57 100644 (file)
@@ -879,7 +879,7 @@ func (e Event) String() string {
                        fmt.Fprintf(&sb, " Trace=%d Mono=%d Wall=%s",
                                s.ClockSnapshot.Trace,
                                s.ClockSnapshot.Mono,
-                               s.ClockSnapshot.Wall.Format(time.RFC3339),
+                               s.ClockSnapshot.Wall.Format(time.RFC3339Nano),
                        )
                }
        }