Moving AssetContainer/SlotMap/Reference benchmarks to appropriate place + testing in game mode too
This commit is contained in:
+6
-3
@@ -1,3 +1,9 @@
|
|||||||
|
/*********************************************************************
|
||||||
|
* \file AssetContainer.cpp
|
||||||
|
*
|
||||||
|
* \author Romain BOULLARD
|
||||||
|
* \date August 2026
|
||||||
|
*********************************************************************/
|
||||||
#include <Engine/Asset/AssetContainer.hpp>
|
#include <Engine/Asset/AssetContainer.hpp>
|
||||||
|
|
||||||
#include <AssetsForBenchmarking/Asset/BenchmarkAsset.hpp>
|
#include <AssetsForBenchmarking/Asset/BenchmarkAsset.hpp>
|
||||||
@@ -9,7 +15,6 @@
|
|||||||
|
|
||||||
namespace Bigfoot
|
namespace Bigfoot
|
||||||
{
|
{
|
||||||
#ifdef BIGFOOT_TOOLMODE
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
using Random = effolkronium::random_static;
|
using Random = effolkronium::random_static;
|
||||||
@@ -67,7 +72,6 @@ void Get(benchmark::State& state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
state.SetItemsProcessed(state.iterations() * count);
|
state.SetItemsProcessed(state.iterations() * count);
|
||||||
state.SetBytesProcessed(static_cast<std::int64_t>(state.iterations() * count * sizeof(BenchmarkAsset)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BENCHMARK(Get)->Name("AssetContainer/Get")->Arg(512)->Arg(8192)->Arg(131'072);
|
BENCHMARK(Get)->Name("AssetContainer/Get")->Arg(512)->Arg(8192)->Arg(131'072);
|
||||||
@@ -167,5 +171,4 @@ void Remove(benchmark::State& state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BENCHMARK(Remove)->Name("AssetContainer/Remove")->Arg(512)->Arg(8192)->Arg(131'072);
|
BENCHMARK(Remove)->Name("AssetContainer/Remove")->Arg(512)->Arg(8192)->Arg(131'072);
|
||||||
#endif
|
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
+6
-2
@@ -1,3 +1,9 @@
|
|||||||
|
/*********************************************************************
|
||||||
|
* \file Reference.cpp
|
||||||
|
*
|
||||||
|
* \author Romain BOULLARD
|
||||||
|
* \date August 2026
|
||||||
|
*********************************************************************/
|
||||||
#include <Engine/Asset/Reference.hpp>
|
#include <Engine/Asset/Reference.hpp>
|
||||||
|
|
||||||
#include <Engine/Asset/AssetLibrary.hpp>
|
#include <Engine/Asset/AssetLibrary.hpp>
|
||||||
@@ -12,7 +18,6 @@
|
|||||||
|
|
||||||
namespace Bigfoot
|
namespace Bigfoot
|
||||||
{
|
{
|
||||||
#ifdef BIGFOOT_TOOLMODE
|
|
||||||
template<template<class> class REFERENCE>
|
template<template<class> class REFERENCE>
|
||||||
void Construct(benchmark::State& state)
|
void Construct(benchmark::State& state)
|
||||||
{
|
{
|
||||||
@@ -128,5 +133,4 @@ void Move(benchmark::State& state)
|
|||||||
|
|
||||||
BENCHMARK_TEMPLATE(Move, HardReference)->Name("Reference/HardReference/Move");
|
BENCHMARK_TEMPLATE(Move, HardReference)->Name("Reference/HardReference/Move");
|
||||||
BENCHMARK_TEMPLATE(Move, SoftReference)->Name("Reference/SoftReference/Move");
|
BENCHMARK_TEMPLATE(Move, SoftReference)->Name("Reference/SoftReference/Move");
|
||||||
#endif
|
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
Reference in New Issue
Block a user