Skip to content

Commit

Permalink
metrics: let tso processing time not include consumption on the netwo…
Browse files Browse the repository at this point in the history
…rk (#3523) (#3525)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: ShuNing <nolouch@gmail.com>
  • Loading branch information
ti-srebot and nolouch authored Mar 25, 2021
1 parent 9a70cb5 commit 0b1f355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func (s *Server) Tso(stream pdpb.PD_TsoServer) error {
if elapsed > slowThreshold {
log.Warn("get timestamp too slow", zap.Duration("cost", elapsed))
}
tsoHandleDuration.Observe(time.Since(start).Seconds())
response := &pdpb.TsoResponse{
Header: s.header(),
Timestamp: &ts,
Expand All @@ -177,7 +178,6 @@ func (s *Server) Tso(stream pdpb.PD_TsoServer) error {
if err := stream.Send(response); err != nil {
return errors.WithStack(err)
}
tsoHandleDuration.Observe(time.Since(start).Seconds())
}
}

Expand Down

0 comments on commit 0b1f355

Please sign in to comment.