瀏覽代碼

Merge pull request #854 from cmumford:printf-fix

PiperOrigin-RevId: 344871226
ld
Chris Mumford 4 年之前
父節點
當前提交
2dcbd4a2c5
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      db/db_test.cc

+ 3
- 1
db/db_test.cc 查看文件

@ -5,6 +5,7 @@
#include "leveldb/db.h"
#include <atomic>
#include <cinttypes>
#include <string>
#include "gtest/gtest.h"
@ -2289,7 +2290,8 @@ static void BM_LogAndApply(benchmark::State& state) {
char buf[16];
std::snprintf(buf, sizeof(buf), "%d", num_base_files);
std::fprintf(stderr,
"BM_LogAndApply/%-6s %8zu iters : %9u us (%7.0f us / iter)\n",
"BM_LogAndApply/%-6s %8" PRIu64
" iters : %9u us (%7.0f us / iter)\n",
buf, state.iterations(), us, ((float)us) / state.iterations());
}

Loading…
取消
儲存