RFR: 8303682: Simplify HttpClient DebugLogger [v2]
Jaikiran Pai
jpai at openjdk.org
Wed Mar 8 11:37:07 UTC 2023
On Wed, 8 Mar 2023 11:29:42 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> The HttpClient internal DebugLogger could be simplified if its configuration was held in a record. Some of the methods in Utils that return a debug logger could also be simplified/removed. The system property that configures the debug logging could be extended to choose between System.err, System.out, System.Logger, or any of these configurations.
>> Passing -Djdk.internal.httpclient.debug=true still works as before.
>
> Daniel Fuchs has updated the pull request incrementally with two additional commits since the last revision:
>
> - Make sure julLogger is not GC'ed before the end of the test.
> - Integrated review feedback
test/jdk/java/net/httpclient/DebugLoggerTest.java line 65:
> 63: * @run main/othervm -Djdk.internal.httpclient.debug=true,log DebugLoggerTest ERR LOG
> 64: * @run main/othervm -Djdk.internal.httpclient.debug=true,out DebugLoggerTest ERR OUT LOG
> 65: * @run main/othervm -Djdk.internal.httpclient.debug=err,OUT,foo DebugLoggerTest ERR OUT
Given that we launch 11 `@run`s in this test, I was curious how long the entire test run would take to complete. Timeout wasn't a concern (I didn't think there would be one), but I was curious if marking them as multiple `@test` runs to run them parallely would gain any performance improvements. But after having run this test locally in the current form, I see that the whole test completes in slightly over 2 seconds. So there's no point in thinking of any optimizations.
-------------
PR: https://git.openjdk.org/jdk/pull/12900
More information about the net-dev
mailing list