Skip to content

Commit 0d2018b

Browse files
committed
Disable SendReqHistogram metric
1 parent ba7ecd5 commit 0d2018b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

rpc/client.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package rpc
1616
import (
1717
"context"
1818
"io"
19-
"strconv"
2019
"sync"
2120
"sync/atomic"
2221
"time"
@@ -524,12 +523,12 @@ func sendBatchRequest(
524523

525524
// SendRequest sends a Request to server and receives Response.
526525
func (c *rpcClient) SendRequest(ctx context.Context, addr string, req *Request, timeout time.Duration) (*Response, error) {
527-
start := time.Now()
528-
reqType := req.Type.String()
529-
storeID := strconv.FormatUint(req.Context.GetPeer().GetStoreId(), 10)
530-
defer func() {
531-
metrics.SendReqHistogram.WithLabelValues(reqType, storeID).Observe(time.Since(start).Seconds())
532-
}()
526+
// start := time.Now()
527+
// reqType := req.Type.String()
528+
// storeID := strconv.FormatUint(req.Context.GetPeer().GetStoreId(), 10)
529+
// defer func() {
530+
// metrics.SendReqHistogram.WithLabelValues(reqType, storeID).Observe(time.Since(start).Seconds())
531+
// }()
533532

534533
connArray, err := c.getConnArray(addr)
535534
if err != nil {

0 commit comments

Comments
 (0)