[ 
https://issues.apache.org/jira/browse/ARTEMIS-2610?focusedWorklogId=381038&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-381038
 ]

ASF GitHub Bot logged work on ARTEMIS-2610:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Feb/20 15:44
            Start Date: 03/Feb/20 15:44
    Worklog Time Spent: 10m 
      Work Description: asfgit commented on pull request #2956: ARTEMIS-2610 
Improve ActiveMQServer.getConnectionCount()
URL: https://github.com/apache/activemq-artemis/pull/2956
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 381038)
    Time Spent: 20m  (was: 10m)

> Improve ActiveMQServer.getConnectionCount()
> -------------------------------------------
>
>                 Key: ARTEMIS-2610
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2610
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.11.0
>            Reporter: Sebastian T
>            Priority: Minor
>              Labels: performance
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> We are using ActiveMQServer.getConnectionCount() as one metric to constantly 
> monitor our brokers via JMX.
> {{ActiveMQServer.getConnectionCount()}} currently invokes 
> {{remotingService.getConnections().size()}} to determine the connection size. 
> This is unnecessarily expensive as {{remotingService.getConnections()}} is 
> synchronized and returns a new {{Set<RemotingConnection>}} instance with all 
> connections on each invocation.
> This PR introduces a new method {{RemotingService.getConnectionCount()}} 
> which avoids the synchronization and temporary object creation.
>  



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

Reply via email to