mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
version name etcd 0.1
This commit is contained in:
parent
0ebd133a0d
commit
3ba4ea65f2
26
store/stats.go
Normal file
26
store/stats.go
Normal file
@ -0,0 +1,26 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type EtcdStats struct {
|
||||
// Number of get requests
|
||||
Gets uint64 `json:"gets"`
|
||||
|
||||
// Number of sets requests
|
||||
Sets uint64 `json:"sets"`
|
||||
|
||||
// Number of delete requests
|
||||
Deletes uint64 `json:"deletes"`
|
||||
|
||||
// Number of testAndSet requests
|
||||
TestAndSets uint64 `json:"testAndSets"`
|
||||
|
||||
}
|
||||
|
||||
// Stats returns the basic statistics information of etcd storage
|
||||
func (s *Store) Stats() []byte {
|
||||
b, _ := json.Marshal(s.BasicStats)
|
||||
return b
|
||||
}
|
@ -2,4 +2,4 @@ package main
|
||||
|
||||
var version = "v1"
|
||||
|
||||
var releaseVersion = "etcd <0.1>"
|
||||
var releaseVersion = "etcd 0.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user