Crossfire Server, Trunk  R20513
Macros | 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.

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)
 
 START_TEST (cast_one_comet)
 
END_TEST START_TEST (cast_random_comet)
 
END_TEST START_TEST (cast_bunch_comet)
 
static void teardown (void)
 

Variables

objectmon
 
mapstructtest_map
 

Macro Definition Documentation

#define HP_DELTA   10

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

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

Definition at line 123 of file comet_perf.c.

References FABS, GET_MAP_OB, liv::hp, HP_DELTA, obj::name, STARTING_HP, obj::stats, TEST_MAP_SIZE, obj::x, and obj::y.

Referenced by START_TEST().

Here is the caller graph for this function:

static END_TEST Suite* comet_suite ( void  )
static

Definition at line 271 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 293 of file comet_perf.c.

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

Here is the call graph for this function:

static void setup ( void  )
static

Definition at line 76 of file comet_perf.c.

References create_archetype(), FLAG_STAND_STILL, get_empty_map(), liv::hp, liv::maxhp, NROFATTACKS, object_copy(), object_insert_in_map_at(), object_new(), object_update_speed(), obj::resist, SET_FLAG, obj::speed, obj::speed_left, STARTING_HP, obj::stats, and TEST_MAP_SIZE.

Referenced by comet_suite().

Here is the call graph for this function:

Here is the caller graph for this function:

START_TEST ( cast_one_comet  )
END_TEST START_TEST ( cast_random_comet  )
END_TEST START_TEST ( cast_bunch_comet  )
static void teardown ( void  )
static

Definition at line 119 of file comet_perf.c.

References free_map().

Referenced by comet_suite().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

object* mon
mapstruct* test_map

Definition at line 73 of file comet_perf.c.

Referenced by CRECombatSimulator::fight(), monsterFight(), and START_TEST().