summaryrefslogtreecommitdiff
path: root/test/perf-assetFactory.cpp
blob: 147e4bad5de4864f6c8ddb0c7c1e1e0ca58355bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "assetFactory/assetFactory.h"
#include "assetFactory/factoryMesh.h"
#include "testMainWindow.h"
#include "ui/applicationBase.h"
#include <benchmark/benchmark.h>

static void
brush47xml_load(benchmark::State & state)
{
	TestMainWindow window;

	for (auto _ : state) {
		benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/brush47.xml"));
	}
}

static void
foliagexml_load(benchmark::State & state)
{
	TestMainWindow window;

	for (auto _ : state) {
		benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/foliage.xml"));
	}
}

BENCHMARK(brush47xml_load);
BENCHMARK(foliagexml_load);

BENCHMARK_MAIN();