-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter #16214
Labels
good first issue
Good for newcomers
Comments
I can look at this one |
nahguam
pushed a commit
to nahguam/pulsar
that referenced
this issue
Jun 29, 2022
…16214) ### Motivation AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. ### Modification Provided a scoped implementation of the above methods for the single counter required for each getter.
5 tasks
nahguam
pushed a commit
to nahguam/pulsar
that referenced
this issue
Jun 29, 2022
…16214) ### Motivation AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. ### Modification Provided a scoped implementation of the above methods for the single counter required for each getter.
RobertIndie
pushed a commit
that referenced
this issue
Jul 1, 2022
…#16286) ### Motivation AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. ### Modification Provided a scoped implementation of the above methods for the single counter required for each getter.
mattisonchao
added a commit
that referenced
this issue
Jul 2, 2022
@nahguam - thanks for contributing the fix for this issue! |
Nicklee007
pushed a commit
to Nicklee007/pulsar
that referenced
this issue
Jul 5, 2022
…16214) (apache#16286) ### Motivation AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. ### Modification Provided a scoped implementation of the above methods for the single counter required for each getter.
codelipenghui
pushed a commit
that referenced
this issue
Jul 10, 2022
…#16286) AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. Provided a scoped implementation of the above methods for the single counter required for each getter. (cherry picked from commit 07c46fe)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this issue
Jul 11, 2022
…16214) (apache#16286) AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. Provided a scoped implementation of the above methods for the single counter required for each getter. (cherry picked from commit 07c46fe) (cherry picked from commit 63a3762)
wuxuanqicn
pushed a commit
to wuxuanqicn/pulsar
that referenced
this issue
Jul 14, 2022
…16214) (apache#16286) ### Motivation AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. ### Modification Provided a scoped implementation of the above methods for the single counter required for each getter.
nahguam
pushed a commit
to nahguam/pulsar
that referenced
this issue
Jul 25, 2022
…16214) (apache#16286) AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. Provided a scoped implementation of the above methods for the single counter required for each getter. (cherry picked from commit 07c46fe)
nahguam
pushed a commit
to nahguam/pulsar
that referenced
this issue
Aug 4, 2022
…16214) (apache#16286) AbstractTopic#getBytesOutCounter and AbstractTopic#getMsgOutCounter both generate full stats only to pick the single required counter for the getters. These can be optimised to perform only the necessary work to calculate the counters. Provided a scoped implementation of the above methods for the single counter required for each getter. (cherry picked from commit 07c46fe)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your enhancement request related to a problem? Please describe.
In reading through the
AbstractTopic
code, I noticed that there are some inefficient stat generations. Specifically:pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
Lines 1135 to 1141 in b236899
Describe the solution you'd like
Based on quickly reading through the usages of these methods and the definition of
getStats
, I think we should find a more direct way to compute the values for these counters.Additional context
I am happy to help review any PRs for this enhancement.
The text was updated successfully, but these errors were encountered: