Luanti 5.19.0-dev
Loading...
Searching...
No Matches
benchmark_mapblock.cpp File Reference
#include "catch.h"
#include "mapblock.h"
#include <vector>
Include dependency graph for benchmark_mapblock.cpp:

Macros

#define BENCH1(_count)

Typedefs

typedef std::vector< MapBlock * > MBContainer

Functions

static void allocateSome (MBContainer &vec, u32 n)
static void freeSome (MBContainer &vec, u32 n)
static void freeAll (MBContainer &vec)
static void workOnMetadata (const MBContainer &vec)
static u32 workOnNodes (const MBContainer &vec)
static u32 workOnBoth (const MBContainer &vec)
 TEST_CASE ("benchmark_mapblock")

Macro Definition Documentation

◆ BENCH1

#define BENCH1 ( _count)

Typedef Documentation

◆ MBContainer

typedef std::vector<MapBlock*> MBContainer

Function Documentation

◆ allocateSome()

void allocateSome ( MBContainer & vec,
u32 n )
static

References MapBlock::MapBlock(), allocateSome(), and S16_MAX.

Referenced by allocateSome().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeAll()

void freeAll ( MBContainer & vec)
inlinestatic

References freeAll(), and freeSome().

Referenced by freeAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeSome()

void freeSome ( MBContainer & vec,
u32 n )
static

References freeSome().

Referenced by freeAll(), and freeSome().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TEST_CASE()

TEST_CASE ( "benchmark_mapblock" )

References BENCH1, and TEST_CASE().

Here is the call graph for this function:

◆ workOnBoth()

u32 workOnBoth ( const MBContainer & vec)
static

References CONTAINS, MapNode::getContent(), MAP_BLOCKSIZE, and workOnBoth().

Referenced by workOnBoth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ workOnMetadata()

void workOnMetadata ( const MBContainer & vec)
static

References MAP_BLOCKSIZE, and workOnMetadata().

Referenced by workOnMetadata().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ workOnNodes()

u32 workOnNodes ( const MBContainer & vec)
static

References CONTENT_AIR, MapNode::getContent(), MAP_BLOCKSIZE, and workOnNodes().

Referenced by workOnNodes().

Here is the call graph for this function:
Here is the caller graph for this function: