You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/01/09 08:34:53 UTC
[GitHub] [pulsar] lordcheng10 opened a new pull request #13681: add dispatch latency
lordcheng10 opened a new pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681
### Motivation
add dispatch latency
### Documentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
- [ ] `doc-required`
(If you need help on updating docs, create a doc issue)
- [x] `no-need-doc`
(Please explain why)
- [ ] `doc`
(If this PR contains doc changes)
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1008547964
/pulsarbot run-failure-checks
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1008253905
@merlimat PTAL,thanks!
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780774788
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -68,6 +68,7 @@
private volatile ScheduledFuture<?> readOnActiveConsumerTask = null;
private final RedeliveryTracker redeliveryTracker;
+ private long startTimeNs;
Review comment:
I have fixed:use nanoTime for startTimeNs;
please review again!
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780774531
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -68,6 +68,7 @@
private volatile ScheduledFuture<?> readOnActiveConsumerTask = null;
private final RedeliveryTracker redeliveryTracker;
+ private long startTimeNs;
Review comment:
OK,I will fix.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1051437130
The pr had no activity for 30 days, mark with Stale label.
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780774510
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -213,6 +214,7 @@ protected void dispatchEntriesToConsumer(Consumer currentConsumer, List<Entry> e
sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(),
redeliveryTracker)
.addListener(future -> {
+ topic.recordAddLatency(System.currentTimeMillis() - startTimeNs, TimeUnit.MILLISECONDS);
Review comment:
Yes, I will fix. thank you !
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r783105923
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
##########
@@ -550,7 +552,10 @@ protected void sendMessagesToConsumers(ReadType readType, List<Entry> entries) {
readType == ReadType.Replay);
c.sendMessages(entriesForThisConsumer, batchSizes, batchIndexesAcks, sendMessageInfo.getTotalMessages(),
- sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(), redeliveryTracker);
+ sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(), redeliveryTracker)
+ .addListener(future -> {
+ topic.recordReadLatency(System.nanoTime() - startTimeNs, TimeUnit.NANOSECONDS);
Review comment:
The `startTimeNs` might be changed during the dispatch process, so that we will get a inaccurate dispatch latency
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780774824
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -213,6 +214,7 @@ protected void dispatchEntriesToConsumer(Consumer currentConsumer, List<Entry> e
sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(),
redeliveryTracker)
.addListener(future -> {
+ topic.recordAddLatency(System.currentTimeMillis() - startTimeNs, TimeUnit.MILLISECONDS);
Review comment:
I have fixed。
PTAL,thanks! @leizhiyuan
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1008771565
/pulsarbot run-failure-checks
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1010382123
ping
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1008587475
/pulsarbot run-failure-checks
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] leizhiyuan commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
leizhiyuan commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780770191
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -213,6 +214,7 @@ protected void dispatchEntriesToConsumer(Consumer currentConsumer, List<Entry> e
sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(),
redeliveryTracker)
.addListener(future -> {
+ topic.recordAddLatency(System.currentTimeMillis() - startTimeNs, TimeUnit.MILLISECONDS);
Review comment:
recordReadLatency?
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780774824
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -213,6 +214,7 @@ protected void dispatchEntriesToConsumer(Consumer currentConsumer, List<Entry> e
sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(),
redeliveryTracker)
.addListener(future -> {
+ topic.recordAddLatency(System.currentTimeMillis() - startTimeNs, TimeUnit.MILLISECONDS);
Review comment:
I have fixed。
PTAL,thanks!
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r783621454
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
##########
@@ -550,7 +552,10 @@ protected void sendMessagesToConsumers(ReadType readType, List<Entry> entries) {
readType == ReadType.Replay);
c.sendMessages(entriesForThisConsumer, batchSizes, batchIndexesAcks, sendMessageInfo.getTotalMessages(),
- sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(), redeliveryTracker);
+ sendMessageInfo.getTotalBytes(), sendMessageInfo.getTotalChunkedMessages(), redeliveryTracker)
+ .addListener(future -> {
+ topic.recordReadLatency(System.nanoTime() - startTimeNs, TimeUnit.NANOSECONDS);
Review comment:
OK I will fix
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780774788
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -68,6 +68,7 @@
private volatile ScheduledFuture<?> readOnActiveConsumerTask = null;
private final RedeliveryTracker redeliveryTracker;
+ private long startTimeNs;
Review comment:
I have fixed:use nanoTime for startTimeNs;
please review again! @Shoothzj
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1009591860
ping
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Shoothzj commented on a change in pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on a change in pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#discussion_r780751922
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java
##########
@@ -68,6 +68,7 @@
private volatile ScheduledFuture<?> readOnActiveConsumerTask = null;
private final RedeliveryTracker redeliveryTracker;
+ private long startTimeNs;
Review comment:
Why use `Ns` variable name for millseconds? it might be confusing
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lordcheng10 commented on pull request #13681: Collect broker dispatch latency in prometheus
Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on pull request #13681:
URL: https://github.com/apache/pulsar/pull/13681#issuecomment-1008930168
ping
--
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@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org