RFR: 6734346: harness reads too many files

Daniel Jeliński djelinski at openjdk.org
Mon Sep 19 13:27:58 UTC 2022


On Mon, 19 Sep 2022 12:28:12 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> This patch fixes a long-standing issue where jtreg reads every java file under a test root (like test/jdk) when generating reports for jobs running a subset of tests.
>> On a Windows machine, this reduces the time required to run a single (fast) test and generate report from 15-20 seconds to 1-3 seconds.
>> 
>> Verified that the generated report looks correct; the report only contains tests that were actually run, so the extra work in scanning every java file was unnecessary.
>> 
>> Did not verify if the existing tests still pass; I'm new to ant, and couldn't get it to run the tests. Are there any instructions I could use?
>
> For large suites, I work around the similar trouble with `JTREG="OPTIONS=-report:executed"` -- maybe we should (additionally?) change the default for `-report`?

Thanks @shipilev for pointing out that option; I completely missed that part of the code. Indeed, using `-report:executed` provides comparable performance.

Checked out [CODETOOLS-7902474](https://bugs.openjdk.org/browse/CODETOOLS-7902474) where the `-report` option was introduced. It appears that the current behavior of scanning the entire directory is intentional, and my fix is incorrect. I'll withdraw this PR.

IMO `-report:executed` should be the default, mostly because `all-executed` is too costly to be the default.

-------------

PR: https://git.openjdk.org/jtharness/pull/38


More information about the jtharness-dev mailing list