[ 
https://issues.apache.org/jira/browse/DISPATCH-2108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17364487#comment-17364487
 ] 

ASF subversion and git services commented on DISPATCH-2108:
-----------------------------------------------------------

Commit e401cb19bc243bd240eb61cae9a1bef9fdd2e549 in qpid-dispatch's branch 
refs/heads/main from Charles E. Rolke
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=e401cb1 ]

DISPATCH-2108: Aggregate statistics for TCP listeners and connectors

This commit adds counters

  * bytesIn
  * bytesOut
  * connectionsOpened
  * connectionsClosed

to tcpListener and tcpConnector entities. Individual bytesIn and bytesOut
for tcpConnections are tracked in the connection entity. The new aggregated
statistics are running totals for all connections created through the
listener and connector entities.

Internally the tcp_bridge_config structure was renamed to tcp_bridge as
the struct is not just config any more. The qd_tcp_connection no longer
holds the actual structure in 'config'. Instead it holds a pointer to
the repurposed structure in 'bridge'.

qd_tcp_bridge_t is now a pooled object. Its lifetime is controlled by
a ref count. A bridge is created synchronously with a listener or a
connector and those entities hold the first reference. Tcp connections
hold a reference to the bridge and target that bridge for ongoing
statistics accumulation.

With the ref counting a connection may be created, say, through a listener.
Then before the connection is closed the listener may be deleted. The
ref count keeps the bridge object alive so that the connection statistics
are still aggregated. Only when the bridge object loses all of its
references is the bridge finally disposed. Bridge objects dump their final
statistics to the TCP_ADAPTOR log at INFO level.

This commit also creates LOCK and UNLOCK macros to aid developers trying
to read the code.

A self test is added to make sure the entity attributes are present and
hold reasonable values.

This closes #2144


> TCP adaptor should aggregate statistics for listener and connector
> ------------------------------------------------------------------
>
>                 Key: DISPATCH-2108
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2108
>             Project: Qpid Dispatch
>          Issue Type: New Feature
>          Components: Protocol Adaptors
>    Affects Versions: 1.16.0
>            Reporter: Charles E. Rolke
>            Assignee: Charles E. Rolke
>            Priority: Major
>             Fix For: 1.17.0
>
>
> For each tcpListener and tcpConnector provide a summary of traffic
>  * number of connections
>  * bytes in
>  * bytes out
> aggregated across all the to and from the listener/connector objects.
> Optionally provide rollup info from all the live connections
>  * last in seconds
>  * last out seconds
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to