You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "superdev42 (via GitHub)" <gi...@apache.org> on 2024/05/15 06:16:33 UTC
[PR] [ISSUE#8142] Show time of create topic and subScriptionGroup [rocketmq]
superdev42 opened a new pull request, #8143:
URL: https://github.com/apache/rocketmq/pull/8143
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### execution time of create topic and subscription
<!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
Fixes #8142
### show time of create topic and subScriptionGroup
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
### add logs of execution time of create topic and subscription
<!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#8142] Show time of create topic and subScriptionGroup [rocketmq]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on code in PR #8143:
URL: https://github.com/apache/rocketmq/pull/8143#discussion_r1602476281
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -515,12 +516,15 @@ private synchronized RemotingCommand updateAndCreateTopic(ChannelHandlerContext
response.setCode(ResponseCode.SYSTEM_ERROR);
response.setRemark(e.getMessage());
}
-
+ long endTime = System.currentTimeMillis();
+ long executionTime = endTime - startTime;
+ LOGGER.info("executionTime of create topic:" + topic + " is " + executionTime + "ms");
Review Comment:
Could you simplify the code?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#8142] Show time of create topic and subScriptionGroup [rocketmq]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin merged PR #8143:
URL: https://github.com/apache/rocketmq/pull/8143
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#8142] Show time of create topic and subScriptionGroup [rocketmq]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on PR #8143:
URL: https://github.com/apache/rocketmq/pull/8143#issuecomment-2114653652
ping @humkum Do you have any more suggestions?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#8142] Show time of create topic and subScriptionGroup [rocketmq]
Posted by "guyinyou (via GitHub)" <gi...@apache.org>.
guyinyou commented on code in PR #8143:
URL: https://github.com/apache/rocketmq/pull/8143#discussion_r1601237774
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -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");
Review Comment:
这里为什么开头要加一个空字符串?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#8142] Show time of create topic and subScriptionGroup [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8143:
URL: https://github.com/apache/rocketmq/pull/8143#issuecomment-2111699541
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/8143?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 42.86%. Comparing base [(`2fdafd2`)](https://app.codecov.io/gh/apache/rocketmq/commit/2fdafd232a45ffd4a72239782248e2d1a91d6abc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`63b02ea`)](https://app.codecov.io/gh/apache/rocketmq/pull/8143?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> :exclamation: Current head 63b02ea differs from pull request most recent head 3b97617. Consider uploading reports for the commit 3b97617 to get more accurate results
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #8143 +/- ##
=============================================
+ Coverage 42.83% 42.86% +0.02%
- Complexity 10360 10362 +2
=============================================
Files 1270 1270
Lines 88690 88698 +8
Branches 11401 11401
=============================================
+ Hits 37993 38023 +30
+ Misses 45995 45969 -26
- Partials 4702 4706 +4
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/8143?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE#8142] Show time of create topic and subScriptionGroup [rocketmq]
Posted by "humkum (via GitHub)" <gi...@apache.org>.
humkum commented on code in PR #8143:
URL: https://github.com/apache/rocketmq/pull/8143#discussion_r1601549362
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -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");
+ LOGGER.info("" + config.getGroupName() + " is " + executionTime + "ms");
Review Comment:
Repeated line
##########
broker/src/main/java/org/apache/rocketmq/broker/filter/CommitLogDispatcherCalcBitMap.java:
##########
@@ -67,6 +67,7 @@ public void dispatch(DispatchRequest request) {
while (iterator.hasNext()) {
ConsumerFilterData filterData = iterator.next();
+
Review Comment:
No need blank line
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org