18 const size_t file_size = 200;
19 uint8_t data[file_size] = {0};
20 data[file_size - 1] = 1;
22 file.
seek(0, SEEK_SET);
Non-refcounted RAII wrapper for FILE*.
void seek(int64_t offset, int origin)
Wrapper around fseek().
Wrapper around an AutoFile& that implements a ring buffer to deserialize from.
void FindByte(std::byte byte)
search for a given byte in the stream, and remain positioned on it
bool SetPos(uint64_t nPos)
rewind to a given reading position
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
FILE * fopen(const fs::path &p, const char *mode)
std::unique_ptr< T > MakeNoLogFileContext(const ChainType chain_type=ChainType::REGTEST, TestOpts opts={})
Make a test setup that has disk access to the debug.log file disabled.
static void FindByte(benchmark::Bench &bench)