auto* iter = db_->NewIterator(read_options);
iter->SeekToFirst();
int64_t num_file_opens = TestGetTickerCount(options, NO_FILE_OPENS);
- int64_t bytes_read = env_->random_read_bytes_counter_;
+ size_t bytes_read = env_->random_read_bytes_counter_;
delete iter;
env_->random_read_bytes_counter_ = 0;
iter = db_->NewIterator(read_options);
iter->SeekToFirst();
int64_t num_file_opens_readahead = TestGetTickerCount(options, NO_FILE_OPENS);
- int64_t bytes_read_readahead = env_->random_read_bytes_counter_;
+ size_t bytes_read_readahead = env_->random_read_bytes_counter_;
delete iter;
ASSERT_EQ(num_file_opens + 3, num_file_opens_readahead);
ASSERT_GT(bytes_read_readahead, bytes_read);
public:
CountingFile(unique_ptr<RandomAccessFile>&& target,
anon::AtomicCounter* counter,
- std::atomic<int64_t>* bytes_read)
+ std::atomic<size_t>* bytes_read)
: target_(std::move(target)),
counter_(counter),
bytes_read_(bytes_read) {}
private:
unique_ptr<RandomAccessFile> target_;
anon::AtomicCounter* counter_;
- std::atomic<int64_t>* bytes_read_;
+ std::atomic<size_t>* bytes_read_;
};
Status s = target()->NewRandomAccessFile(f, r, soptions);
bool count_random_reads_;
anon::AtomicCounter random_read_counter_;
- std::atomic<int64_t> random_read_bytes_counter_;
+ std::atomic<size_t> random_read_bytes_counter_;
std::atomic<int> random_file_open_counter_;
bool count_sequential_reads_;