-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
Proposal Details
I am created https://go-review.googlesource.com/c/go/+/564995 and https://go-review.googlesource.com/c/go/+/564576, in this process, discover a way to find test possible worth running in parallel, which can be done automatically with go test .
This method is go test -v gets the run time for each of the tests, then excludes tests that have already been run in parallel and tests that have taken a short time, and the rest are tests that might be worth running in parallel.
For example:
get from go test -v runtime
=== RUN TestSmhasherTwoNonzero
--- PASS: TestSmhasherTwoNonzero (9.09s)
This can determine that TestSmosherTwoNonzero may be worth running in parallel.
However, based on the experience gained in the aforementioned CL, it is more convenient for go test to perform this search.
because there may be many tests, there may be log and skip outputs, and there are clear rules for performing this lookup with go test.
Specific proposal content
Add a flag, name undetermined, use maybeparallel as placeholder for now, go test -maybeparallel only provides this semantics, which reports tests that may be worth running in parallel.
One way to achieve this is outputs the name and time of the test that did not run in parallel and took longer than 0.4 seconds.
Worth discussing:
Maybe also should add a flag, set test that is not complete after a certain time, go test -maybeparallel only output these test name and test run time.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status