]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/perf_local.cc: reduce scope of some variables 21708/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 27 Apr 2018 21:52:37 +0000 (23:52 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 27 Apr 2018 21:52:37 +0000 (23:52 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/perf_local.cc

index 037b31398ffd6e5f0fb9821f6732892f2744b8d9..ede48395099cb743764483edbb6e07d270151e9d 100644 (file)
@@ -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;