Browse Source

store: remove unused function

Jonathan Boulle 11 years ago
parent
commit
1fa763b47b
3 changed files with 1 additions and 16 deletions
  1. 1 2
      etcdserver/server_test.go
  2. 0 9
      store/stats.go
  3. 0 5
      store/store.go

+ 1 - 2
etcdserver/server_test.go

@@ -1131,8 +1131,7 @@ func (s *storeRecorder) Recovery(b []byte) error {
 	s.record(action{name: "Recovery"})
 	s.record(action{name: "Recovery"})
 	return nil
 	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) {
 func (s *storeRecorder) DeleteExpiredKeys(cutoff time.Time) {
 	s.record(action{
 	s.record(action{
 		name:   "DeleteExpiredKeys",
 		name:   "DeleteExpiredKeys",

+ 0 - 9
store/stats.go

@@ -86,7 +86,6 @@ func (s *Stats) clone() *Stats {
 		s.CompareAndDeleteSuccess, s.CompareAndDeleteFail, s.Watchers, s.ExpireCount}
 		s.CompareAndDeleteSuccess, s.CompareAndDeleteFail, s.Watchers, s.ExpireCount}
 }
 }
 
 
-// Status() return the statistics info of etcd storage its recent start
 func (s *Stats) toJson() []byte {
 func (s *Stats) toJson() []byte {
 	b, _ := json.Marshal(s)
 	b, _ := json.Marshal(s)
 	return b
 	return b
@@ -96,14 +95,6 @@ func (s *Stats) TotalReads() uint64 {
 	return s.GetSuccess + s.GetFail
 	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) {
 func (s *Stats) Inc(field int) {
 	switch field {
 	switch field {
 	case SetSuccess:
 	case SetSuccess:

+ 0 - 5
store/store.go

@@ -56,7 +56,6 @@ type Store interface {
 	Save() ([]byte, error)
 	Save() ([]byte, error)
 	Recovery(state []byte) error
 	Recovery(state []byte) error
 
 
-	TotalTransactions() uint64
 	JsonStats() []byte
 	JsonStats() []byte
 	DeleteExpiredKeys(cutoff time.Time)
 	DeleteExpiredKeys(cutoff time.Time)
 }
 }
@@ -656,7 +655,3 @@ func (s *store) JsonStats() []byte {
 	s.Stats.Watchers = uint64(s.WatcherHub.count)
 	s.Stats.Watchers = uint64(s.WatcherHub.count)
 	return s.Stats.toJson()
 	return s.Stats.toJson()
 }
 }
-
-func (s *store) TotalTransactions() uint64 {
-	return s.Stats.TotalTranscations()
-}