Browse Source

version name etcd 0.1

Xiang Li 12 years ago
parent
commit
3ba4ea65f2
2 changed files with 27 additions and 1 deletions
  1. 26 0
      store/stats.go
  2. 1 1
      version.go

+ 26 - 0
store/stats.go

@@ -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
+}

+ 1 - 1
version.go

@@ -2,4 +2,4 @@ package main
 
 var version = "v1"
 
-var releaseVersion = "etcd <0.1>"
+var releaseVersion = "etcd 0.1"