| 215 | void AddMessage(Slice msg) { AppendWithSpace(&message_, msg); } |
| 216 | |
| 217 | void FinishedSingleOp() { |
| 218 | if (FLAGS_histogram) { |
| 219 | double now = g_env->NowMicros(); |
| 220 | double micros = now - last_op_finish_; |
| 221 | hist_.Add(micros); |
| 222 | if (micros > 20000) { |
| 223 | fprintf(stderr, "long op: %.1f micros%30s\r", micros, ""); |
| 224 | fflush(stderr); |
| 225 | } |
| 226 | last_op_finish_ = now; |
| 227 | } |
| 228 | |
| 229 | done_++; |
| 230 | if (done_ >= next_report_) { |
| 231 | if (next_report_ < 1000) |
| 232 | next_report_ += 100; |
| 233 | else if (next_report_ < 5000) |
| 234 | next_report_ += 500; |
| 235 | else if (next_report_ < 10000) |
| 236 | next_report_ += 1000; |
| 237 | else if (next_report_ < 50000) |
| 238 | next_report_ += 5000; |
| 239 | else if (next_report_ < 100000) |
| 240 | next_report_ += 10000; |
| 241 | else if (next_report_ < 500000) |
| 242 | next_report_ += 50000; |
| 243 | else |
| 244 | next_report_ += 100000; |
| 245 | fprintf(stderr, "... finished %d ops%30s\r", done_, ""); |
| 246 | fflush(stderr); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | void AddBytes(int64_t n) { bytes_ += n; } |
| 251 |
no test coverage detected