Open howardjohn opened 2 years ago
Hi @howardjohn, is this issue still open to help from the community? I would be interested to help here
@cebernardi Sure. Appreciate your help.
Awesome! Taking a stab..
Great! the list may be out of date though, just FYI
I opened a draft PR to check if the direction could be good (for the first 2 enumerated tests) and get some early feedback.
Hey @howardjohn, I am looking to pick up some of these tests. Is the original list up to date?
Hasn't been updated since the original issue.
I believe I found it by
test-times () {
rg --hidden '\-\-\- PASS' | map 'i.split("PASS: ")[1].replace("(", "").replace(")", "")' | sort -k2,2 -n
}
cat build-log.txt | test-times
You can get the build log by goin to the commit, clicking the green check or red x and going to the prow page: https://prow.istio.io/view/gs/istio-prow/logs/unit-tests_istio_postsubmit/1637825841897410560 for example
test-times () {
rg --hidden '\-\-\- PASS' | map 'i.split("PASS: ")[1].replace("(", "").replace(")", "")' | sort -k2,2 -n
}
@howardjohn I could not locate map command on my ubuntu (v22.04) box. Which package it belongs to?
I see time taken by TestSignCSR varies a lot. On my local system, it is taking around one to one and half sec. Some times it takes less than a sec as well. On Prow CI/CD pipeline, I see two instances with 8s and 3s. Wonder why such deviation? Appreciate if someone can help me to understand.
go test ./security/pkg/pki/ca -count=1 -v -run ^TestSignCSR$
=== RUN TestSignCSR
--- PASS: TestSignCSR (1.44s)
PASS
ok istio.io/istio/security/pkg/pki/ca 1.452s
go test ./security/pkg/pki/ca -count=1 -v -run ^TestSignCSR$
=== RUN TestSignCSR
--- PASS: TestSignCSR (1.12s)
PASS
ok istio.io/istio/security/pkg/pki/ca 1.130s
go test ./security/pkg/pki/ca -count=1 -v -run ^TestSignCSR$
=== RUN TestSignCSR
--- PASS: TestSignCSR (0.78s)
PASS
ok istio.io/istio/security/pkg/pki/ca 0.795s
Btw below links might have expire
https://prow.istio.io/log?job=unit-tests_istio_postsubmit&id=1669581982494887936
=== RUN TestSignCSR
--- PASS: TestSignCSR (8.21s)
https://prow.istio.io/log?job=unit-tests_istio_postsubmit&id=1669650939406979072
=== RUN TestSignCSR
--- PASS: TestSignCSR (3.60s)
Ci runs with -race, I think it makes the signing take exceptionally long
on the map command - sorry it's an alias, I can post the content when I'm at my computer
I use this to get a list of the tests with execution time:
cat build-log.txt | grep "\-\-\- PASS" | grep -v " \-\-\- PASS:" | sort -V -k2 -t'('
I hope this helps
I wrote a lot about Go build times which is tightly coupled to test times: https://blog.howardjohn.info/posts/go-build-times/
cc
New slow list:
The following tests take >1s:
These should be optimized.
It is recommended to run https://github.com/istio/istio/wiki/Test-Flakes#reproducing-test-flakes locally before fixing anything to ensure that changes (such as lowering timeouts, etc) do not make things flaky.