• Brad Fitzpatrick's avatar
    cmd/dist: skip compiling 100 packages without benchmarks in race mode · 3ead4998
    Brad Fitzpatrick authored
    The go_test_bench:* tests run:
    
        go test -short -race -run=^$ -benchtime=.1s -cpu=4 $PKG
    
    ... on each discovered package with any tests. (The same set used for
    the "go_test:*" tests)
    
    That set was 168 packages:
    
    $ go tool dist test -list | grep go_test: | wc -l
    168
    
    But only 76 of those have a "func Benchmark", and running each
    "go_test_bench:" test and compiling it in race mode, just to do
    nothing took 1-2 seconds each.
    
    So stop doing that and filter out the useless packages earlier. Now:
    
    $ go tool dist test -list -race | grep go_test_bench:  | wc -l
    76
    
    Should save 90-180 seconds. (or maybe 45 seconds for trybots, since
    they're sharded)
    
    Updates #17104
    
    Change-Id: I08ccb072a0dc0454ea425540ee8e74b59f83b773
    Reviewed-on: https://go-review.googlesource.com/29153
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    3ead4998
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...