This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new 559b5b3  SCB-155 Optimize metric.go (#246)
559b5b3 is described below

commit 559b5b38250f193ce9ebe56a4b4907a4e374516d
Author: little-cui <[email protected]>
AuthorDate: Tue Jan 9 19:11:21 2018 +0800

    SCB-155 Optimize metric.go (#246)
---
 pkg/etcdsync/mutex.go | 2 +-
 server/rest/metric.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/etcdsync/mutex.go b/pkg/etcdsync/mutex.go
index 0ef019f..96adcf8 100644
--- a/pkg/etcdsync/mutex.go
+++ b/pkg/etcdsync/mutex.go
@@ -163,7 +163,7 @@ func (m *DLock) Lock(wait bool) error {
                                        func(message string, evt 
*registry.PluginResponse) error {
                                                if evt != nil && evt.Action == 
registry.Delete {
                                                        // break this for-loop, 
and try to create the node again.
-                                                       return fmt.Errorf("Lock 
released, id=%s", m.id)
+                                                       return fmt.Errorf("Lock 
released")
                                                }
                                                return nil
                                        }))
diff --git a/server/rest/metric.go b/server/rest/metric.go
index 350aed8..5642382 100644
--- a/server/rest/metric.go
+++ b/server/rest/metric.go
@@ -62,7 +62,7 @@ func init() {
 
 func ReportRequestCompleted(w http.ResponseWriter, r *http.Request, start 
time.Time) {
        instance := fmt.Sprint(core.Instance.Endpoints)
-       elapsed := float64(time.Since(start).Nanoseconds()) / 1000
+       elapsed := float64(time.Since(start).Nanoseconds()) / 
float64(time.Microsecond)
        route, _ := r.Context().Value(rest.CTX_MATCH_PATTERN).(string)
 
        if strings.Index(r.Method, "WATCH") != 0 {

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to