Crossfire Server, Trunk
comet_perf.cpp File Reference
#include <stdlib.h>
#include <check.h>
#include <global.h>
#include <sproto.h>
#include <toolkit_common.h>
+ Include dependency graph for comet_perf.cpp:

Go to the source code of this file.

Macros

#define HP_DELTA   10
 
#define NUM_COMETS_TO_CAST   30
 
#define NUM_TICKS_TO_RUN   500
 
#define STARTING_HP   25000
 
#define TEST_MAP_SIZE   40
 

Functions

static void check_hp (const char *test, int hp_row[TEST_MAP_SIZE], int hp_diag[TEST_MAP_SIZE])
 
static END_TEST Suite * comet_suite (void)
 
int main (void)
 
static void setup (void)
 
END_TEST START_TEST (cast_bunch_comet)
 
 START_TEST (cast_one_comet)
 
END_TEST START_TEST (cast_random_comet)
 
static void teardown (void)
 

Variables

objectmon
 
mapstructtest_map
 

Macro Definition Documentation

◆ HP_DELTA

#define HP_DELTA   10

Definition at line 65 of file comet_perf.cpp.

◆ NUM_COMETS_TO_CAST

#define NUM_COMETS_TO_CAST   30

Definition at line 56 of file comet_perf.cpp.

◆ NUM_TICKS_TO_RUN

#define NUM_TICKS_TO_RUN   500

Definition at line 55 of file comet_perf.cpp.

◆ STARTING_HP

#define STARTING_HP   25000

Definition at line 57 of file comet_perf.cpp.

◆ TEST_MAP_SIZE

#define TEST_MAP_SIZE   40

Definition at line 54 of file comet_perf.cpp.

Function Documentation

◆ check_hp()

static void check_hp ( const char *  test,
int  hp_row[TEST_MAP_SIZE],
int  hp_diag[TEST_MAP_SIZE] 
)
static

Definition at line 124 of file comet_perf.cpp.

References FABS, FAIL, FAIL_UNLESS, GET_MAP_OB, living::hp, HP_DELTA, mon, object::name, STARTING_HP, object::stats, test_map, TEST_MAP_SIZE, nlohmann::detail::void(), diamondslots::x, object::x, and object::y.

Referenced by START_TEST().

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

◆ comet_suite()

static END_TEST Suite* comet_suite ( void  )
static

Definition at line 277 of file comet_perf.cpp.

References setup(), and teardown().

Referenced by main().

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

◆ main()

int main ( void  )

Definition at line 299 of file comet_perf.cpp.

References cctk_setdatadir(), comet_suite(), FMT64U, init(), Statistics::spell_hash_full, Statistics::spell_merges, Statistics::spell_suppressions, and statistics.

+ Here is the call graph for this function:

◆ setup()

static void setup ( void  )
static

◆ START_TEST() [1/3]

END_TEST START_TEST ( cast_bunch_comet  )

◆ START_TEST() [2/3]

START_TEST ( cast_one_comet  )

◆ START_TEST() [3/3]

END_TEST START_TEST ( cast_random_comet  )

◆ teardown()

static void teardown ( void  )
static

Definition at line 120 of file comet_perf.cpp.

References free_map(), and test_map.

Referenced by comet_suite().

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

Variable Documentation

◆ mon

◆ test_map