浏览代码

Initialize Stats::start_ before first use in Stats::Start().

Avoids a use before initialization error. This fixes issue #676.

PiperOrigin-RevId: 246855204
main
Chris Mumford 5 年前
父节点
当前提交
142035edd4
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. +1
    -3
      benchmarks/db_bench.cc

+ 1
- 3
benchmarks/db_bench.cc 查看文件

@ -187,14 +187,12 @@ class Stats {
void Start() {
next_report_ = 100;
last_op_finish_ = start_;
hist_.Clear();
done_ = 0;
bytes_ = 0;
seconds_ = 0;
start_ = g_env->NowMicros();
finish_ = start_;
message_.clear();
start_ = finish_ = last_op_finish_ = g_env->NowMicros();
}
void Merge(const Stats& other) {

正在加载...
取消
保存