blob: c19a7fcbae0424219a159d48753c6bb085e78261 (
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
|
#include "app.hpp"
#include "path-search.hpp"
#include <chrono>
namespace floormat {
void test_app::test_dijkstra()
{
auto w = world();
auto a = astar();
using namespace std::chrono;
using clock = high_resolution_clock;
const auto t0 = clock::now();
for (int i = 0; i < 10; i++)
{
a.Dijkstra(w, {}, 0, {{0, 0, 0}, {}}, {{1, 1, 0}, {}},
1*TILE_MAX_DIM*iTILE_SIZE2.x());
}
const auto tm = clock::now() - t0;
Debug{} << "test took" << std::chrono::duration_cast<milliseconds>(tm).count() << "ms.";
}
} // namespace floormat
|