mirror of
https://github.com/vgough/encfs.git
synced 2024-12-01 04:14:30 +01:00
15 lines
333 B
C++
15 lines
333 B
C++
#include "benchmark/benchmark.h"
|
|
|
|
#include "encfs/MemoryPool.h"
|
|
|
|
using namespace encfs;
|
|
|
|
static void BM_MemPoolAllocate(benchmark::State& state) {
|
|
while (state.KeepRunning()) {
|
|
auto block = MemoryPool::allocate(1024);
|
|
MemoryPool::release(block);
|
|
}
|
|
}
|
|
// Register the function as a benchmark
|
|
BENCHMARK(BM_MemPoolAllocate);
|