Crossfire Server, Branch 1.12  R12190
Defines | Functions | Variables
comet_perf.c File Reference
#include <stdlib.h>
#include <check.h>
#include <global.h>
#include <sproto.h>
Include dependency graph for comet_perf.c:

Go to the source code of this file.

Defines

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

Functions

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

Variables

object * mon
mapstructtest_map

Define Documentation

#define HP_DELTA   5

Definition at line 64 of file comet_perf.c.

Referenced by check_hp().

#define NUM_COMETS_TO_CAST   30

Definition at line 55 of file comet_perf.c.

Referenced by START_TEST().

#define NUM_TICKS_TO_RUN   500

Definition at line 54 of file comet_perf.c.

Referenced by START_TEST().

#define STARTING_HP   25000

Definition at line 56 of file comet_perf.c.

Referenced by check_hp(), and setup().

#define TEST_MAP_SIZE   40

Definition at line 53 of file comet_perf.c.

Referenced by check_hp(), setup(), and START_TEST().


Function Documentation

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

Definition at line 129 of file comet_perf.c.

References FABS, GET_MAP_OB, HP_DELTA, mon, STARTING_HP, and TEST_MAP_SIZE.

Referenced by START_TEST().

Here is the caller graph for this function:

END_TEST Suite* comet_suite ( void  )

Definition at line 292 of file comet_perf.c.

References setup(), and teardown().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( void  )

Definition at line 314 of file comet_perf.c.

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

Here is the call graph for this function:

void setup ( void  )
START_TEST ( cast_one_comet  )

Definition at line 197 of file comet_perf.c.

References cast_spell(), check_hp(), create_archetype(), insert_ob_in_map(), insert_ob_in_ob(), NUM_TICKS_TO_RUN, process_events(), test_map, and TEST_MAP_SIZE.

Here is the call graph for this function:

END_TEST START_TEST ( cast_random_comet  )
END_TEST START_TEST ( cast_bunch_comet  )

Definition at line 263 of file comet_perf.c.

References cast_spell(), check_hp(), create_archetype(), insert_ob_in_map(), insert_ob_in_ob(), NUM_COMETS_TO_CAST, NUM_TICKS_TO_RUN, process_events(), test_map, and TEST_MAP_SIZE.

Here is the call graph for this function:

void teardown ( void  )

Definition at line 125 of file comet_perf.c.

References free_map().

Here is the call graph for this function:


Variable Documentation

object* mon

Definition at line 73 of file comet_perf.c.

Referenced by setup(), and START_TEST().