Skip to content

Commit

Permalink
refactor(metarepos): remove redundant metric mr.build_commit_results.…
Browse files Browse the repository at this point in the history
…duration
  • Loading branch information
ijsong committed Jul 28, 2023
1 parent fcacd1a commit 44eead0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/metarepos/raft_metadata_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,6 @@ func (mr *RaftMetadataRepository) applyCommit(r *mrpb.Commit, appliedIndex uint6
)
}

startTime := time.Now()
_, err := mr.withTelemetry(context.TODO(), "mr.build_commit_results.duration", func(ctx context.Context) (interface{}, error) {
defer mr.storage.ResetUpdateSinceCommit()

Expand Down Expand Up @@ -973,10 +972,6 @@ func (mr *RaftMetadataRepository) applyCommit(r *mrpb.Commit, appliedIndex uint6
return nil, nil
})

mr.tmStub.mb.Records("mr.build_commit_results.duration").Record(context.Background(),
float64(time.Since(startTime).Nanoseconds())/float64(time.Millisecond),
)

return err
}

Expand Down

0 comments on commit 44eead0

Please sign in to comment.