Skip to content
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

[ISSUE#8142] Show time of create topic and subScriptionGroup #8143

Merged
merged 3 commits into from
May 20, 2024

Conversation

superdev42
Copy link
Contributor

execution time of create topic and subscription

Fixes #8142

show time of create topic and subScriptionGroup

add logs of execution time of create topic and subscription

@codecov-commenter
Copy link

codecov-commenter commented May 15, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 42.85%. Comparing base (2fdafd2) to head (06bb759).
Report is 2 commits behind head on develop.

Files Patch % Lines
...ocketmq/broker/processor/AdminBrokerProcessor.java 87.50% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8143      +/-   ##
=============================================
- Coverage      42.95%   42.85%   -0.11%     
+ Complexity     10384    10355      -29     
=============================================
  Files           1270     1270              
  Lines          88690    88696       +6     
  Branches       11401    11402       +1     
=============================================
- Hits           38097    38010      -87     
- Misses         45899    45978      +79     
- Partials        4694     4708      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1462,6 +1468,10 @@ private RemotingCommand updateAndCreateSubscriptionGroup(ChannelHandlerContext c

response.setCode(ResponseCode.SUCCESS);
response.setRemark(null);
long endTime = System.currentTimeMillis();
long executionTime = endTime - startTime;
LOGGER.info("" + config.getGroupName() + " is " + executionTime + "ms");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么开头要加一个空字符串?

@@ -67,6 +67,7 @@ public void dispatch(DispatchRequest request) {
while (iterator.hasNext()) {
ConsumerFilterData filterData = iterator.next();


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need blank line

long endTime = System.currentTimeMillis();
long executionTime = endTime - startTime;
LOGGER.info("" + config.getGroupName() + " is " + executionTime + "ms");
LOGGER.info("" + config.getGroupName() + " is " + executionTime + "ms");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeated line

Comment on lines 519 to 521
long endTime = System.currentTimeMillis();
long executionTime = endTime - startTime;
LOGGER.info("executionTime of create topic:" + topic + " is " + executionTime + "ms");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you simplify the code?

Copy link
Contributor

@guyinyou guyinyou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@RongtongJin
Copy link
Contributor

ping @humkum Do you have any more suggestions?

@RongtongJin RongtongJin merged commit 256217f into apache:develop May 20, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

execution time of create topic and subscription
7 participants