On Wed, 22 Nov 2023 12:25:45 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Added mirror event with static methods: jdk.internal.event.SelectionEvent 
>> that provides the duration of select calls and the count of how many keys 
>> are available.
>> 
>> Emit the event from SelectorImpl::lockAndDoSelect
>> 
>> Test at jdk.jfr.event.io.TestSelectionEvents
>
> src/jdk.jfr/share/classes/jdk/jfr/events/SelectionEvent.java line 43:
> 
>> 41: 
>> 42:     @Label("Selection Count")
>> 43:     @Description("Number of channels selected")
> 
> I suspect you'll need to rename this event to something like "SelectorSelect" 
> as "Selection" could be anything.
> 
> We'll to find a better name for the field and the label too. There are two 
> forms of selection operations. One form operates on a selected-key set where 
> the select/selectNow methods returns the number of keys aded to the 
> Selector's ready set. The other form performs an action on each selected key. 
> I'll try to come up a suggestions for the names, I suspect a label "number of 
> channels ready for I/O or added to ready set" would be the most accurate.

It would also be good if the name reflect that it is related to channels so it 
won't clash with other events in the future.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16710#discussion_r1403242271

Reply via email to