Luanti 5.10.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)

Referenced by TEST_CASE().

Typedef Documentation

◆ MBContainer

typedef std::vector<MapBlock*> MBContainer

Function Documentation

◆ allocateSome()

static void allocateSome ( MBContainer & vec,
u32 n )
static

References S16_MAX.

◆ freeAll()

static void freeAll ( MBContainer & vec)
inlinestatic

References freeSome().

+ Here is the call graph for this function:

◆ freeSome()

static void freeSome ( MBContainer & vec,
u32 n )
static

Referenced by freeAll().

+ Here is the caller graph for this function:

◆ TEST_CASE()

TEST_CASE ( "benchmark_mapblock" )

References BENCH1.

◆ workOnBoth()

static u32 workOnBoth ( const MBContainer & vec)
static

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

+ Here is the call graph for this function:

◆ workOnMetadata()

static void workOnMetadata ( const MBContainer & vec)
static

References MAP_BLOCKSIZE.

◆ workOnNodes()

static u32 workOnNodes ( const MBContainer & vec)
static

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

+ Here is the call graph for this function: