benchmark: printSecondSample with time series

This commit is contained in:
Gyu-Ho Lee
2016-03-14 16:53:04 -07:00
parent d1ece7d621
commit 5eefff12e1
5 changed files with 113 additions and 4 deletions

View File

@ -42,6 +42,7 @@ func init() {
RootCmd.AddCommand(rangeCmd)
rangeCmd.Flags().IntVar(&rangeTotal, "total", 10000, "Total number of range requests")
rangeCmd.Flags().StringVar(&rangeConsistency, "consistency", "l", "Linearizable(l) or Serializable(s)")
rangeCmd.Flags().BoolVar(&sample, "sample", false, "'true' to sample requests for every second")
}
func rangeFunc(cmd *cobra.Command, args []string) {
@ -112,7 +113,7 @@ func doRange(client v3.KV, requests <-chan v3.Op) {
if err != nil {
errStr = err.Error()
}
results <- result{errStr: errStr, duration: time.Since(st)}
results <- result{errStr: errStr, duration: time.Since(st), happened: time.Now()}
bar.Increment()
}
}