You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/01/21 13:31:00 UTC

[GitHub] [rocketmq] xxd763795151 opened a new pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

xxd763795151 opened a new pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617


   …es to send
   
   
   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   Add property of benchmark`s producer that specifies how many messages to send, when sending a specified number of message, send over.
   
   ## Brief changelog
   
   XX
   
   ## Verifying this change
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] coveralls edited a comment on pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#issuecomment-764650670


   
   [![Coverage Status](https://coveralls.io/builds/37362269/badge)](https://coveralls.io/builds/37362269)
   
   Coverage increased (+0.2%) to 52.033% when pulling **2d18e506683f1f2b05839425ac571634ba6cc4a7 on xxd763795151:bench_producer_num** into **8b63761f535ed1f6be3ccf1c5dff3ea761c46e92 on apache:develop**.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] xxd763795151 commented on a change in pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
xxd763795151 commented on a change in pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#discussion_r580018406



##########
File path: example/src/main/java/org/apache/rocketmq/example/benchmark/Producer.java
##########
@@ -198,10 +209,27 @@ public void run() {
                             } catch (InterruptedException ignored) {
                             }
                         }
+                        if (messageNum > 0 && ++num >= msgNumLimit) {
+                            break;
+                        }
                     }
                 }
             });
         }
+        try {
+            sendThreadPool.shutdown();
+            sendThreadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);
+            timer.cancel();
+            if (snapshotList.size() > 1) {
+                doPrintStats(snapshotList, statsBenchmark, true);
+            } else {
+                System.out.printf("[Complete] Send Total: %d Send Failed: %d Response Failed: %d%n",
+                    statsBenchmark.getSendRequestSuccessCount().get() + statsBenchmark.getSendRequestFailedCount().get(),
+                    statsBenchmark.getSendRequestFailedCount().get(), statsBenchmark.getReceiveResponseFailedCount().get());
+            }
+            producer.shutdown();
+        } catch (InterruptedException ignored) {

Review comment:
       emmmm...I look elsewhere in the code, there are not any action about the InterruptedException. So I keep the original code style doing not print the exception message there.
   If necessary I can catch the Exception instead of InterruptedException there and invoking e.printStackTrace(), may be better. What do you think, do I make this adjusetment?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] codecov-io commented on pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#issuecomment-764660571


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=h1) Report
   > Merging [#2617](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=desc) (32881d4) into [develop](https://codecov.io/gh/apache/rocketmq/commit/6af12592af95916cc0b4512f2bab60ee18f62b8b?el=desc) (6af1259) will **increase** coverage by `0.53%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2617/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv)](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=tree)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2617      +/-   ##
   =============================================
   + Coverage      45.80%   46.34%   +0.53%     
   - Complexity      4306     4352      +46     
   =============================================
     Files            547      547              
     Lines          36246    36478     +232     
     Branches        4808     4908     +100     
   =============================================
   + Hits           16601    16904     +303     
   + Misses         17552    17479      -73     
   - Partials        2093     2095       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...mq/client/impl/consumer/RebalanceLitePullImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VMaXRlUHVsbEltcGwuamF2YQ==) | `49.15% <0.00%> (-5.09%)` | `10.00% <0.00%> (-1.00%)` | |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `75.55% <0.00%> (-4.45%)` | `9.00% <0.00%> (-1.00%)` | |
   | [...he/rocketmq/client/impl/consumer/ProcessQueue.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Qcm9jZXNzUXVldWUuamF2YQ==) | `57.67% <0.00%> (-4.19%)` | `31.00% <0.00%> (-1.00%)` | |
   | [...nt/impl/consumer/ConsumeMessageOrderlyService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Db25zdW1lTWVzc2FnZU9yZGVybHlTZXJ2aWNlLmphdmE=) | `38.98% <0.00%> (-3.62%)` | `16.00% <0.00%> (ø%)` | |
   | [...client/consumer/store/RemoteBrokerOffsetStore.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvc3RvcmUvUmVtb3RlQnJva2VyT2Zmc2V0U3RvcmUuamF2YQ==) | `67.56% <0.00%> (-1.81%)` | `20.00% <0.00%> (-2.00%)` | |
   | [...etmq/client/latency/LatencyFaultToleranceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvbGF0ZW5jeS9MYXRlbmN5RmF1bHRUb2xlcmFuY2VJbXBsLmphdmE=) | `50.00% <0.00%> (ø)` | `8.00% <0.00%> (ø%)` | |
   | [...e/rocketmq/namesrv/routeinfo/RouteInfoManager.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vUm91dGVJbmZvTWFuYWdlci5qYXZh) | `39.12% <0.00%> (+0.21%)` | `28.00% <0.00%> (+1.00%)` | |
   | [...he/rocketmq/remoting/protocol/RemotingCommand.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL1JlbW90aW5nQ29tbWFuZC5qYXZh) | `78.62% <0.00%> (+0.40%)` | `67.00% <0.00%> (+1.00%)` | |
   | [...n/java/org/apache/rocketmq/store/ha/HAService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL0hBU2VydmljZS5qYXZh) | `68.54% <0.00%> (+0.66%)` | `18.00% <0.00%> (ø%)` | |
   | [.../rocketmq/client/impl/consumer/PullAPIWrapper.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsQVBJV3JhcHBlci5qYXZh) | `51.28% <0.00%> (+0.85%)` | `13.00% <0.00%> (+1.00%)` | |
   | ... and [20 more](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=footer). Last update [6af1259...32881d4](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] codecov-io commented on pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#issuecomment-764660571


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=h1) Report
   > Merging [#2617](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=desc) (32881d4) into [develop](https://codecov.io/gh/apache/rocketmq/commit/6af12592af95916cc0b4512f2bab60ee18f62b8b?el=desc) (6af1259) will **increase** coverage by `0.53%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2617/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv)](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=tree)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2617      +/-   ##
   =============================================
   + Coverage      45.80%   46.34%   +0.53%     
   - Complexity      4306     4352      +46     
   =============================================
     Files            547      547              
     Lines          36246    36478     +232     
     Branches        4808     4908     +100     
   =============================================
   + Hits           16601    16904     +303     
   + Misses         17552    17479      -73     
   - Partials        2093     2095       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...mq/client/impl/consumer/RebalanceLitePullImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VMaXRlUHVsbEltcGwuamF2YQ==) | `49.15% <0.00%> (-5.09%)` | `10.00% <0.00%> (-1.00%)` | |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `75.55% <0.00%> (-4.45%)` | `9.00% <0.00%> (-1.00%)` | |
   | [...he/rocketmq/client/impl/consumer/ProcessQueue.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Qcm9jZXNzUXVldWUuamF2YQ==) | `57.67% <0.00%> (-4.19%)` | `31.00% <0.00%> (-1.00%)` | |
   | [...nt/impl/consumer/ConsumeMessageOrderlyService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Db25zdW1lTWVzc2FnZU9yZGVybHlTZXJ2aWNlLmphdmE=) | `38.98% <0.00%> (-3.62%)` | `16.00% <0.00%> (ø%)` | |
   | [...client/consumer/store/RemoteBrokerOffsetStore.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvc3RvcmUvUmVtb3RlQnJva2VyT2Zmc2V0U3RvcmUuamF2YQ==) | `67.56% <0.00%> (-1.81%)` | `20.00% <0.00%> (-2.00%)` | |
   | [...etmq/client/latency/LatencyFaultToleranceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvbGF0ZW5jeS9MYXRlbmN5RmF1bHRUb2xlcmFuY2VJbXBsLmphdmE=) | `50.00% <0.00%> (ø)` | `8.00% <0.00%> (ø%)` | |
   | [...e/rocketmq/namesrv/routeinfo/RouteInfoManager.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vUm91dGVJbmZvTWFuYWdlci5qYXZh) | `39.12% <0.00%> (+0.21%)` | `28.00% <0.00%> (+1.00%)` | |
   | [...he/rocketmq/remoting/protocol/RemotingCommand.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL1JlbW90aW5nQ29tbWFuZC5qYXZh) | `78.62% <0.00%> (+0.40%)` | `67.00% <0.00%> (+1.00%)` | |
   | [...n/java/org/apache/rocketmq/store/ha/HAService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL0hBU2VydmljZS5qYXZh) | `68.54% <0.00%> (+0.66%)` | `18.00% <0.00%> (ø%)` | |
   | [.../rocketmq/client/impl/consumer/PullAPIWrapper.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsQVBJV3JhcHBlci5qYXZh) | `51.28% <0.00%> (+0.85%)` | `13.00% <0.00%> (+1.00%)` | |
   | ... and [20 more](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=footer). Last update [6af1259...32881d4](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] lizhiboo commented on a change in pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on a change in pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#discussion_r580705501



##########
File path: example/src/main/java/org/apache/rocketmq/example/benchmark/Producer.java
##########
@@ -198,10 +209,27 @@ public void run() {
                             } catch (InterruptedException ignored) {
                             }
                         }
+                        if (messageNum > 0 && ++num >= msgNumLimit) {
+                            break;
+                        }
                     }
                 }
             });
         }
+        try {
+            sendThreadPool.shutdown();
+            sendThreadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);
+            timer.cancel();
+            if (snapshotList.size() > 1) {
+                doPrintStats(snapshotList, statsBenchmark, true);
+            } else {
+                System.out.printf("[Complete] Send Total: %d Send Failed: %d Response Failed: %d%n",
+                    statsBenchmark.getSendRequestSuccessCount().get() + statsBenchmark.getSendRequestFailedCount().get(),
+                    statsBenchmark.getSendRequestFailedCount().get(), statsBenchmark.getReceiveResponseFailedCount().get());
+            }
+            producer.shutdown();
+        } catch (InterruptedException ignored) {

Review comment:
       In this case, benchmark only runs once, throw InterruptedException and print exception message maybe friendly to users.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] coveralls commented on pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#issuecomment-764650670


   
   [![Coverage Status](https://coveralls.io/builds/36496126/badge)](https://coveralls.io/builds/36496126)
   
   Coverage increased (+0.1%) to 51.96% when pulling **32881d466e1a4b379e0addc5faf7372708d48517 on xxd763795151:bench_producer_num** into **8b63761f535ed1f6be3ccf1c5dff3ea761c46e92 on apache:develop**.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] coveralls commented on pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#issuecomment-764650670


   
   [![Coverage Status](https://coveralls.io/builds/36496126/badge)](https://coveralls.io/builds/36496126)
   
   Coverage increased (+0.1%) to 51.96% when pulling **32881d466e1a4b379e0addc5faf7372708d48517 on xxd763795151:bench_producer_num** into **8b63761f535ed1f6be3ccf1c5dff3ea761c46e92 on apache:develop**.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] lizhiboo commented on a change in pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on a change in pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#discussion_r579941539



##########
File path: example/src/main/java/org/apache/rocketmq/example/benchmark/Producer.java
##########
@@ -198,10 +209,27 @@ public void run() {
                             } catch (InterruptedException ignored) {
                             }
                         }
+                        if (messageNum > 0 && ++num >= msgNumLimit) {
+                            break;
+                        }
                     }
                 }
             });
         }
+        try {
+            sendThreadPool.shutdown();
+            sendThreadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);
+            timer.cancel();
+            if (snapshotList.size() > 1) {
+                doPrintStats(snapshotList, statsBenchmark, true);
+            } else {
+                System.out.printf("[Complete] Send Total: %d Send Failed: %d Response Failed: %d%n",
+                    statsBenchmark.getSendRequestSuccessCount().get() + statsBenchmark.getSendRequestFailedCount().get(),
+                    statsBenchmark.getSendRequestFailedCount().get(), statsBenchmark.getReceiveResponseFailedCount().get());
+            }
+            producer.shutdown();
+        } catch (InterruptedException ignored) {

Review comment:
       IMO, print some exception message maybe a good choice.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky merged pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
duhenglucky merged pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617


   


-- 
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:
users@infra.apache.org



[GitHub] [rocketmq] codecov-io edited a comment on pull request #2617: [ISSUE #2615]Add property of benchmark`s producer that specifies how many messages to send

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #2617:
URL: https://github.com/apache/rocketmq/pull/2617#issuecomment-764660571


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=h1) Report
   > Merging [#2617](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=desc) (2d18e50) into [develop](https://codecov.io/gh/apache/rocketmq/commit/6af12592af95916cc0b4512f2bab60ee18f62b8b?el=desc) (6af1259) will **increase** coverage by `0.28%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2617/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv)](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=tree)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2617      +/-   ##
   =============================================
   + Coverage      45.80%   46.08%   +0.28%     
   - Complexity      4306     4333      +27     
   =============================================
     Files            547      547              
     Lines          36246    36246              
     Branches        4808     4809       +1     
   =============================================
   + Hits           16601    16703     +102     
   + Misses         17552    17453      -99     
   + Partials        2093     2090       -3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...mq/client/impl/consumer/RebalanceLitePullImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VMaXRlUHVsbEltcGwuamF2YQ==) | `49.15% <0.00%> (-5.09%)` | `10.00% <0.00%> (-1.00%)` | |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `75.55% <0.00%> (-4.45%)` | `9.00% <0.00%> (-1.00%)` | |
   | [...he/rocketmq/client/impl/consumer/ProcessQueue.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Qcm9jZXNzUXVldWUuamF2YQ==) | `57.67% <0.00%> (-4.19%)` | `31.00% <0.00%> (-1.00%)` | |
   | [...client/consumer/store/RemoteBrokerOffsetStore.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvc3RvcmUvUmVtb3RlQnJva2VyT2Zmc2V0U3RvcmUuamF2YQ==) | `67.56% <0.00%> (-1.81%)` | `20.00% <0.00%> (-2.00%)` | |
   | [...nt/impl/consumer/ConsumeMessageOrderlyService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Db25zdW1lTWVzc2FnZU9yZGVybHlTZXJ2aWNlLmphdmE=) | `41.51% <0.00%> (-1.09%)` | `19.00% <0.00%> (+3.00%)` | :arrow_down: |
   | [...he/rocketmq/client/trace/AsyncTraceDispatcher.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvQXN5bmNUcmFjZURpc3BhdGNoZXIuamF2YQ==) | `73.60% <0.00%> (-0.51%)` | `17.00% <0.00%> (ø%)` | |
   | [...org/apache/rocketmq/store/DefaultMessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0RlZmF1bHRNZXNzYWdlU3RvcmUuamF2YQ==) | `56.45% <0.00%> (-0.10%)` | `110.00% <0.00%> (+1.00%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/store/StoreStatsService.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL1N0b3JlU3RhdHNTZXJ2aWNlLmphdmE=) | `29.50% <0.00%> (ø)` | `26.00% <0.00%> (ø%)` | |
   | [...main/java/org/apache/rocketmq/store/CommitLog.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0NvbW1pdExvZy5qYXZh) | `66.52% <0.00%> (+0.10%)` | `79.00% <0.00%> (ø%)` | |
   | [.../apache/rocketmq/logging/inner/LoggingBuilder.java](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree#diff-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9Mb2dnaW5nQnVpbGRlci5qYXZh) | `64.08% <0.00%> (+0.15%)` | `3.00% <0.00%> (ø%)` | |
   | ... and [18 more](https://codecov.io/gh/apache/rocketmq/pull/2617/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=footer). Last update [6af1259...2d18e50](https://codecov.io/gh/apache/rocketmq/pull/2617?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org