mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #1325 from jonboulle/store_cleaner_still
store: remove unused code
This commit is contained in:
commit
aed525edee
@ -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",
|
||||
|
@ -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
|
||||
}
|
@ -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:
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user