On Wed, 13 Apr 2022 22:59:13 GMT, liach <d...@openjdk.java.net> wrote:

>> XenoAmess has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   add jmh
>
> test/micro/org/openjdk/bench/java/io/InputStreamSkipBenchmark.java line 54:
> 
>> 52:     @Benchmark
>> 53:     public long testSkip0(Data data) throws IOException {
>> 54:         TestBaseInputStream0 testBaseInputStream = new 
>> TestBaseInputStream0(data.inputStreamSize);
> 
> Instead of creating 3 methods with identical bodies, I recommend using an 
> enum to represent the type of buffers. An example at 
> https://github.com/openjdk/jdk/blob/7a9844cb1cd18c18ce097741cba7db1148c83de0/test/micro/org/openjdk/bench/java/util/HashMapBench.java#L65-L71
> 
> For enum values, you can name them like `LOCAL_VARIABLE`, `FIELD`, 
> `SOFT_REFERENCE`, which is more descriptive than current "0, 1, 2," etc.

@liach done.

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

PR: https://git.openjdk.java.net/jdk/pull/5872

Reply via email to