[
https://issues.apache.org/jira/browse/HTTPCORE-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494670
]
Oleg Kalnichevski commented on HTTPCORE-21:
-------------------------------------------
Hi Andrea
I reviewed the patch a little more carefully and submitted chunks of with some
minor modifications. However I also found areas where more work was needed.
(1) #receiveResponseEntity() method merely generates an HttpEntity instance,
but it does not actually retrieve its content. Hence updating the
ReceivedBytesCount in #receiveResponseEntity() does not do much.
The solution to this problem could to keep a reference to HttpTransportMetrics
of the corresponding HTTP data receiver and transmitter inside
HttpConnectionMetrics. This would also eliminate the need to copy the counts
from HttpTransportMetrics to HttpConnectionMetrics and lots of ugly code along
with it
(2) HttpConnectionMetrics belongs to the generic HttpConnection interface, not
just HttpClientConnection. We also want to be able to keep metrics for server
side connections
(3) Some test coverage would be great
Anyways, many thanks for this patch and for contributing to the project. It is
very much appreciated
Oleg
> have connections count requests
> -------------------------------
>
> Key: HTTPCORE-21
> URL: https://issues.apache.org/jira/browse/HTTPCORE-21
> Project: HttpComponents Core
> Issue Type: Wish
> Components: HttpCore
> Affects Versions: 4.0-alpha3
> Reporter: Roland Weber
> Priority: Minor
> Fix For: 4.0-alpha5
>
> Attachments: 2k6-12-28-reqcnt-1.txt, metrics.patch, metrics_v2.patch
>
>
> It would be nice if connections would count the requests sent since they were
> opened. This would greatly simplify the implementation of reuse strategies
> like "reuse for at most 5 requests". While it is possible to count requests
> elsewhere, that is clumsy and error prone. For example the HttpContext is not
> a good place to keep the request count, since the connection may be released
> to and re-acquired from a connection manager, so the previously used context
> is lost.
> patch follows
> cheers,
> Roland
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]