From 44eead00393903b3c78a46ec5ef1cabe9fa48a0a Mon Sep 17 00:00:00 2001 From: Injun Song Date: Tue, 4 Jul 2023 07:57:52 +0900 Subject: [PATCH] refactor(metarepos): remove redundant metric mr.build_commit_results.duration --- internal/metarepos/raft_metadata_repository.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/metarepos/raft_metadata_repository.go b/internal/metarepos/raft_metadata_repository.go index 931eda9b8..cd3c243fd 100644 --- a/internal/metarepos/raft_metadata_repository.go +++ b/internal/metarepos/raft_metadata_repository.go @@ -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() @@ -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 }