This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.7 by this push:
new c088717 [ISSUE 10153][Go Function] fix time unit ns -> ms (#10160)
c088717 is described below
commit c088717a419502220cba5a4b4fa12b258abf6a79
Author: linlinnn <[email protected]>
AuthorDate: Mon Apr 19 22:32:45 2021 +0800
[ISSUE 10153][Go Function] fix time unit ns -> ms (#10160)
Co-authored-by: linjunhua <[email protected]>
(cherry picked from commit e9bf54aa9c76281557b01439ad7e65be50cb0f3f)
---
pulsar-function-go/pf/stats.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pulsar-function-go/pf/stats.go b/pulsar-function-go/pf/stats.go
index 8159cac..5aea8b2 100644
--- a/pulsar-function-go/pf/stats.go
+++ b/pulsar-function-go/pf/stats.go
@@ -243,7 +243,7 @@ func (stat *StatWithLabelValues) processTimeEnd() {
if stat.processStartTime != 0 {
now := time.Now()
duration := now.UnixNano() - stat.processStartTime
- stat.statProcessLatencyMs.Observe(float64(duration))
+ stat.statProcessLatencyMs.Observe(float64(duration) / 1e6)
}
}