adding lots of different stats

This commit is contained in:
Chris Lu
2014-03-26 13:22:27 -07:00
parent 39b774a131
commit 59f6a13609
8 changed files with 123 additions and 31 deletions

View File

@@ -165,12 +165,16 @@ func parseURLPath(path string) (vid, fid, filename, ext string, isVolumeIdOnly b
func statsCounterHandler(w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
m["Version"] = util.VERSION
m["Statistics"] = serverStats
m["Counters"] = serverStats
writeJsonQuiet(w, r, m)
}
type MemoryStatistics struct {
}
func statsMemoryHandler(w http.ResponseWriter, r *http.Request) {
m := make(map[string]interface{})
m["Version"] = util.VERSION
m["Statistics"] = serverStats
m["Memory"] = stats.MemStat()
writeJsonQuiet(w, r, m)
}