You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2010/07/14 11:50:50 UTC
[jira] Commented: (HTTPCORE-230) Need time related metrics data
[ https://issues.apache.org/jira/browse/HTTPCORE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888272#action_12888272 ]
Oleg Kalnichevski commented on HTTPCORE-230:
--------------------------------------------
Protected visibility has compatibility implications. Once a method is made protected it can no longer be changed without breaking the binary compatibility. I deeply regret having so MANY protected methods and variables should have been private instead.
When doing something special one should consider building a custom implementation of relevant interface instead of an existing class and thus creating a dependency on a particular implementation. Besides, one would be much better off adding even notifications to an interface by decorating it with a wrapper class instead of extending a particular implementation of that interface.
Protected methods similar to #createMetrics can be created on a case by case basis where justified.
Oleg
> Need time related metrics data
> ------------------------------
>
> Key: HTTPCORE-230
> URL: https://issues.apache.org/jira/browse/HTTPCORE-230
> Project: HttpComponents HttpCore
> Issue Type: New Feature
> Components: HttpCore
> Reporter: Zhang Guilin
> Fix For: 4.1
>
>
> I found this issue HTTPCORE-181 raised before.
> I got the similar requirement that we want to measure all kinds of time-related data to get the performance report such as:
> 1. DNS parsing time
> 2. Connection setup time
> 2. header parsing time
> 3. body transfer time
> ...
> I found that there are a lot of "private" fields which have no setter method in this component, this makes us hard to extend the functionality.
> For example in org.apache.http.impl.io.AbstractSessionInputBuffer#init() method, it would be better to change "this.metrics = new HttpTransportMetricsImpl();" to "this.metrics = createMetrics()" (a protected method) which subclasses can easily override this if they want to get an extended HttpTransportMetricsImpl instance.
> Can some one look at this feature?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org