Merge pull request #1325 from jonboulle/store_cleaner_still

store: remove unused code
This commit is contained in:
Jonathan Boulle 2014-10-17 09:02:36 -07:00
commit aed525edee
4 changed files with 1 additions and 31 deletions

View File

@ -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",

View File

@ -1,11 +0,0 @@
package store
// MinVersion returns the minimum compatible store version.
func MinVersion() int {
return 2
}
// MaxVersion returns the maximum compatible store version.
func MaxVersion() int {
return 2
}

View File

@ -86,24 +86,11 @@ 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
}
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:

View File

@ -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()
}