control: add more loggins for key count

This commit is contained in:
Gyu-Ho Lee 2016-11-15 16:35:09 -08:00
parent 38952dd5ce
commit 9a6277d5d1
No known key found for this signature in database
GPG Key ID: 1DDD39C7EB70C24C
2 changed files with 6 additions and 2 deletions

View File

@ -218,9 +218,9 @@ func step2(cfg Config) error {
}
reqGen := func(reqs chan<- request) { generateWrites(cfg, vals, reqs) }
generateReport(cfg, h, reqGen)
plog.Println("generateReport is finished...")
plog.Println("generateReport is finished... checking total keys")
plog.Println("checking total keys on", cfg.DatabaseEndpoints)
var totalKeysFunc func([]string) map[string]int64
switch cfg.Database {
case "etcdv2":

View File

@ -195,6 +195,8 @@ func getTotalKeysEtcdv3(endpoints []string) map[string]int64 {
if !strings.HasPrefix(ep, "http://") {
ep = "http://" + ep
}
plog.Println("GET", ep+"/metrics")
resp, err := http.Get(ep + "/metrics")
if err != nil {
plog.Println(err)
@ -221,6 +223,8 @@ func getTotalKeysEtcdv3(endpoints []string) map[string]int64 {
}
gracefulClose(resp)
}
plog.Println("getTotalKeysEtcdv3", rs)
return rs
}