From eb2af20abd6b2b3472d7fd28a359ccef8554d451 Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Tue, 25 Aug 2026 23:18:50 +0200 Subject: [PATCH] byte_per_sec in benchmarks --- Bigfoot/Benchmarks/Engine/AssetContainer/AssetContainer.cpp | 3 +++ Bigfoot/Benchmarks/Utils/Container/SlotMap.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Bigfoot/Benchmarks/Engine/AssetContainer/AssetContainer.cpp b/Bigfoot/Benchmarks/Engine/AssetContainer/AssetContainer.cpp index 7d491b4..68cf1a0 100644 --- a/Bigfoot/Benchmarks/Engine/AssetContainer/AssetContainer.cpp +++ b/Bigfoot/Benchmarks/Engine/AssetContainer/AssetContainer.cpp @@ -33,6 +33,7 @@ void Insert(benchmark::State& state) } state.SetItemsProcessed(state.iterations() * count); + state.SetBytesProcessed(static_cast(state.iterations() * count * sizeof(BenchmarkAsset))); } BENCHMARK(Insert)->Name("AssetContainer/Insert")->Arg(512)->Arg(8192)->Arg(131'072); @@ -66,6 +67,7 @@ void Get(benchmark::State& state) } state.SetItemsProcessed(state.iterations() * count); + state.SetBytesProcessed(static_cast(state.iterations() * count * sizeof(BenchmarkAsset))); } BENCHMARK(Get)->Name("AssetContainer/Get")->Arg(512)->Arg(8192)->Arg(131'072); @@ -161,6 +163,7 @@ void Remove(benchmark::State& state) } state.SetItemsProcessed(state.iterations() * count); + state.SetBytesProcessed(static_cast(state.iterations() * count * sizeof(BenchmarkAsset))); } BENCHMARK(Remove)->Name("AssetContainer/Remove")->Arg(512)->Arg(8192)->Arg(131'072); diff --git a/Bigfoot/Benchmarks/Utils/Container/SlotMap.cpp b/Bigfoot/Benchmarks/Utils/Container/SlotMap.cpp index ac9fadb..194e1d6 100644 --- a/Bigfoot/Benchmarks/Utils/Container/SlotMap.cpp +++ b/Bigfoot/Benchmarks/Utils/Container/SlotMap.cpp @@ -137,6 +137,7 @@ void Insert(benchmark::State& state) } state.SetItemsProcessed(state.iterations() * count); + state.SetBytesProcessed(static_cast(state.iterations() * count * sizeof(MyComplexStruct))); } template @@ -170,6 +171,7 @@ void Remove(benchmark::State& state) } state.SetItemsProcessed(state.iterations() * count); + state.SetBytesProcessed(static_cast(state.iterations() * count * sizeof(MyComplexStruct))); } template @@ -201,6 +203,7 @@ void Get(benchmark::State& state) } state.SetItemsProcessed(state.iterations() * count); + state.SetBytesProcessed(static_cast(state.iterations() * count * sizeof(MyComplexStruct))); } template @@ -226,6 +229,7 @@ void Iterate(benchmark::State& state) } state.SetItemsProcessed(state.iterations() * count); + state.SetBytesProcessed(static_cast(state.iterations() * count * sizeof(MyComplexStruct))); } #define BIGFOOT_REGISTER_BENCHMARKS(ADAPTOR, NAME) \