|
|
@ -224,13 +224,13 @@ class CacheTierBenchmark { |
|
|
|
// Lookup in cache
|
|
|
|
// Lookup in cache
|
|
|
|
StopWatchNano timer(Env::Default(), /*auto_start=*/true); |
|
|
|
StopWatchNano timer(Env::Default(), /*auto_start=*/true); |
|
|
|
std::unique_ptr<char[]> block; |
|
|
|
std::unique_ptr<char[]> block; |
|
|
|
uint64_t size; |
|
|
|
size_t size; |
|
|
|
Status status = cache_->Lookup(key, &block, &size); |
|
|
|
Status status = cache_->Lookup(key, &block, &size); |
|
|
|
if (!status.ok()) { |
|
|
|
if (!status.ok()) { |
|
|
|
fprintf(stderr, "%s\n", status.ToString().c_str()); |
|
|
|
fprintf(stderr, "%s\n", status.ToString().c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
assert(status.ok()); |
|
|
|
assert(status.ok()); |
|
|
|
assert(size == (uint64_t)FLAGS_iosize); |
|
|
|
assert(size == (size_t) FLAGS_iosize); |
|
|
|
|
|
|
|
|
|
|
|
// adjust stats
|
|
|
|
// adjust stats
|
|
|
|
const size_t elapsed_micro = timer.ElapsedNanos() / 1000; |
|
|
|
const size_t elapsed_micro = timer.ElapsedNanos() / 1000; |
|
|
|