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

2020-02-14 Thread Patrick Concannon

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


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

2020-02-14 Thread Alan Bateman

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


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

2020-02-13 Thread Chris Hegarty



> On 13 Feb 2020, at 14:27, Patrick Concannon  
> wrote:
> 
> Hi,
> 
> 
> Could someone please review my webrev for JDK-8234812 'Add micros for 
> DatagramChannel send/receive' ?
> 
> This test adds some benchmarks for the DatagramChannel's send, receive, read 
> and write methods.
> 
> 
> bug: https://bugs.openjdk.java.net/browse/JDK-8234812
> webrev: http://cr.openjdk.java.net/~pconcannon/8234812/webrevs/webrev.00/
> 

Did you intentionally use heap byte buffers, or should the test use direct 
buffers?

-Chris.