diff --git a/etcdserver/server_test.go b/etcdserver/server_test.go index 73d194e65..3f9d96659 100644 --- a/etcdserver/server_test.go +++ b/etcdserver/server_test.go @@ -1131,8 +1131,7 @@ func (s *storeRecorder) Recovery(b []byte) error { s.record(action{name: "Recovery"}) return nil } -func (s *storeRecorder) TotalTransactions() uint64 { return 0 } -func (s *storeRecorder) JsonStats() []byte { return nil } +func (s *storeRecorder) JsonStats() []byte { return nil } func (s *storeRecorder) DeleteExpiredKeys(cutoff time.Time) { s.record(action{ name: "DeleteExpiredKeys", diff --git a/store/stats.go b/store/stats.go index 5f3cd62a3..c04613e9c 100644 --- a/store/stats.go +++ b/store/stats.go @@ -86,7 +86,6 @@ func (s *Stats) clone() *Stats { s.CompareAndDeleteSuccess, s.CompareAndDeleteFail, s.Watchers, s.ExpireCount} } -// Status() return the statistics info of etcd storage its recent start func (s *Stats) toJson() []byte { b, _ := json.Marshal(s) return b @@ -96,14 +95,6 @@ func (s *Stats) TotalReads() uint64 { return s.GetSuccess + s.GetFail } -func (s *Stats) TotalTranscations() uint64 { - return s.SetSuccess + s.SetFail + - s.DeleteSuccess + s.DeleteFail + - s.CompareAndSwapSuccess + s.CompareAndSwapFail + - s.CompareAndDeleteSuccess + s.CompareAndDeleteFail + - s.UpdateSuccess + s.UpdateFail -} - func (s *Stats) Inc(field int) { switch field { case SetSuccess: diff --git a/store/store.go b/store/store.go index a33d74843..6e8818d87 100644 --- a/store/store.go +++ b/store/store.go @@ -56,7 +56,6 @@ type Store interface { Save() ([]byte, error) Recovery(state []byte) error - TotalTransactions() uint64 JsonStats() []byte DeleteExpiredKeys(cutoff time.Time) } @@ -656,7 +655,3 @@ func (s *store) JsonStats() []byte { s.Stats.Watchers = uint64(s.WatcherHub.count) return s.Stats.toJson() } - -func (s *store) TotalTransactions() uint64 { - return s.Stats.TotalTranscations() -}