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)

Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch authored Mar 25, 2021
1 parent c690318 commit c4f22fd
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 c4f22fd

Please sign in to comment.