]> Cypherpunks repositories - gostls13.git/commit
cmd/cover: replace code using optimized golang.org/x/tools/cover
authorKoichi Shiraishi <zchee.io@gmail.com>
Fri, 21 Aug 2020 12:23:18 +0000 (21:23 +0900)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Sun, 14 Mar 2021 13:09:57 +0000 (13:09 +0000)
commit88b8a1608987d494f3f29618e7524e61712c31ba
tree2f9cf1bed312ef6b68d25c7f68503482e83eb40f
parent7936efecc8981fab11b445d96cdb1480d9d8208b
cmd/cover: replace code using optimized golang.org/x/tools/cover

After CL 179377, this change deletes all the prior cmd/cover code
and instead vendors and type aliases code using the significantly
optimized  golang.org/x/tools/cover, which sped up ParseProfiles by
manually parsing profiles instead of a regex. The speed up was:

name         old time/op   new time/op   delta
ParseLine-12 2.43µs ± 2%   0.05µs ± 8%   -97.98% (p=0.000 n=10+9)

name         old speed     new speed       delta
ParseLine-12 42.5MB/s ± 2% 2103.2MB/s ± 7% +4853.14% (p=0.000 n=10+9)

Fixes #32211.

Change-Id: Ie4e8be7502f25eb95fae7a9d8334fc97b045d53f
Reviewed-on: https://go-review.googlesource.com/c/go/+/249759
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/cover/profile.go
src/cmd/vendor/golang.org/x/tools/cover/profile.go [new file with mode: 0644]
src/cmd/vendor/modules.txt