RFR[8234812]: 'Add micros for DatagramChannel send/receive'

Patrick Concannon patrick.concannon at oracle.com
Fri Feb 14 16:13:41 UTC 2020


Hi,

Thanks for the feedback Chris and Alan.

I've added an boolean parameter to the benchmark to allow for the use of 
a direct ByteBuffer -- true for direct, false for heap. In interest of 
keeping the run time of the benchmark down, I've only included a 'true' 
value. However, 'false' can be added if a more comprehensive comparison 
is required.

http://cr.openjdk.java.net/~pconcannon/8234812/webrevs/webrev.02/

Kind regards,

Patrick


On 14/02/2020 09:41, Alan Bateman wrote:
> On 13/02/2020 16:53, Chris Hegarty wrote:
>> :
>> Did you intentionally use heap byte buffers, or should the test use 
>> direct buffers?
>>
> That is a good discussion point as there is a matrix of heap vs. 
> direct, blocking vs. non-blocking, scatter/gather, ... that could be 
> added to create more comprehensive micros. I don't have a strong 
> opinion on this but your suggestion for heap vs. direct would be 
> useful to have as it would help track of the overhead of copying in or 
> out of temporary direct buffers (this overhead has been reduced 
> significantly in recent releases but should still be observable in 
> micros that don't do anything but send/receive or read/write).
>
> -Alan


More information about the nio-dev mailing list