From: Danny Al-Gaaf Date: Fri, 27 Apr 2018 21:52:37 +0000 (+0200) Subject: test/perf_local.cc: reduce scope of some variables X-Git-Tag: v13.1.0~44^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21708%2Fhead;p=ceph.git test/perf_local.cc: reduce scope of some variables Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/perf_local.cc b/src/test/perf_local.cc index 037b31398ffd..ede48395099c 100644 --- a/src/test/perf_local.cc +++ b/src/test/perf_local.cc @@ -637,11 +637,10 @@ double perf_prefetch() uint64_t total_ticks = 0; int count = 10; char buf[16 * 64]; - uint64_t start, stop; for (int i = 0; i < count; i++) { PerfHelper::flush_cache(); - start = Cycles::rdtsc(); + uint64_t start = Cycles::rdtsc(); prefetch(&buf[576], 64); prefetch(&buf[0], 64); prefetch(&buf[512], 64); @@ -658,7 +657,7 @@ double perf_prefetch() prefetch(&buf[832], 64); prefetch(&buf[64], 64); prefetch(&buf[192], 64); - stop = Cycles::rdtsc(); + uint64_t stop = Cycles::rdtsc(); total_ticks += stop - start; } return Cycles::to_seconds(total_ticks) / count / 16;