]> Cypherpunks repositories - gostls13.git/commit
runtime: pass nanotime and gomaxprocs into startCycle and endCycle explicitly
authorMichael Knyszek <mknyszek@google.com>
Fri, 1 Oct 2021 19:07:45 +0000 (15:07 -0400)
committerMichael Knyszek <mknyszek@google.com>
Fri, 29 Oct 2021 18:35:59 +0000 (18:35 +0000)
commit5ec2427357f4917d0aad40cffddeea73e580129e
treea63abe5328886352bdaf6201ab0ae850f0721e03
parent9da64156a62e4661fb5b0e64a2f196f253ce0dc5
runtime: pass nanotime and gomaxprocs into startCycle and endCycle explicitly

This is to facilitate testing of the pacer, since otherwise this is
accessing global state, which is impossible to stub out properly.

For #44167.

Change-Id: I52c3b51fc0ffff38e3bbe534bd66e5761c0003a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/353353
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/mgc.go
src/runtime/mgcpacer.go