store: remove unused function

release-2.0
Jonathan Boulle 2014-10-17 00:04:22 -07:00
parent 70bbf8b470
commit 1fa763b47b
3 changed files with 1 additions and 16 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

@ -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:

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