[
https://issues.apache.org/jira/browse/DIRMINA-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512852
]
Trustin Lee commented on DIRMINA-24:
------------------------------------
A few comments...
1. Printing the duration for every event execution is not usually an expected
behavior. We could store the number of events and the sum of the execution
time and display the average (and min/max) duration on request (via some method
call or in a periodical manner).
2. I think we don't need to introduce ProfilerTimeUnit enum as a public type
because users don't have interest in its internals. Users could simply specify
TimeUnit value, and then we could convert it into ProfilerTimeUnit enum or
something else, and make ProfilerTimeUnit private.
3. We have IoEventType enum, so we don't need to use an integer mask. I'd
rather use EnumSet<IoEventType>, and replace getMethodsToLog and
setMethodsToLog with getEventsToProfile and setEventsToProfile. Utilizing
varargs is also a good idea.
4. Milliseconds might be more suitable as a default time unit, because most
servers work with backend resources such as database. We could simplify the
implementation by limiting timeUnit to be either MILLISECONDS or NANOSECONDS.
> Performance profiler filter
> ---------------------------
>
> Key: DIRMINA-24
> URL: https://issues.apache.org/jira/browse/DIRMINA-24
> Project: MINA
> Issue Type: New Feature
> Components: Filter
> Affects Versions: 0.7.0, 0.8.0
> Reporter: Trustin Lee
>
> We could profile event handler methods of ProtocolHandler to find bottleneck
> in runtime. It will be very useful because filters can be added and removed
> on the fly in runtime.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.