This is an automated email from the ASF dual-hosted git repository.
jerrypeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 5fa83b8 Fixing function latency metric arithmetic error (#2868)
5fa83b8 is described below
commit 5fa83b81345a3460464d49d95e47f8d487b773c3
Author: Boyang Jerry Peng <[email protected]>
AuthorDate: Sun Oct 28 23:38:13 2018 -0700
Fixing function latency metric arithmetic error (#2868)
---
.../main/java/org/apache/pulsar/functions/instance/FunctionStats.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/FunctionStats.java
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/FunctionStats.java
index c45837b..f2195de 100644
---
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/FunctionStats.java
+++
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/FunctionStats.java
@@ -99,7 +99,7 @@ public class FunctionStats {
if (totalSuccessfullyProcessed <= 0) {
return 0;
} else {
- return totalLatencyMs / totalSuccessfullyProcessed;
+ return totalLatencyMs / (double) totalSuccessfullyProcessed;
}
}