ARB
Classes | Macros | Typedefs | Functions | Variables
arb_perf_test.cxx File Reference
#include <arbdbt.h>
#include <climits>
#include <ctime>
#include <sys/time.h>
Include dependency graph for arb_perf_test.cxx:

Go to the source code of this file.

Classes

struct  Test
 

Macros

#define TEST(fun)   { #fun, test_##fun }
 
#define SECOND   1000000
 
#define WANTED_TIME   5*SECOND
 

Typedefs

typedef void(* test_fun )()
 

Functions

static void iterate (GBDATA *gbd)
 
static void test_GB_iterate_DB ()
 
static void test_GB_find_string ()
 
static void test_GB_find_string_indexed ()
 
static void noop ()
 
static long callDelay (long loops)
 
static long run_test (test_fun fun, long loops, double *perCall)
 
static long estimate_loops (test_fun fun)
 
static long count_elements (GBDATA *gbd)
 
int ARB_main (int argc, char *argv[])
 

Variables

static GBDATAgb_species_data = NULp
 
static GBDATAgb_main = NULp
 
static Test Test []
 

Macro Definition Documentation

#define TEST (   fun)    { #fun, test_##fun }

Definition at line 55 of file arb_perf_test.cxx.

#define SECOND   1000000

Definition at line 69 of file arb_perf_test.cxx.

Referenced by ARB_main(), and run_test().

#define WANTED_TIME   5*SECOND

Definition at line 70 of file arb_perf_test.cxx.

Referenced by estimate_loops().

Typedef Documentation

typedef void(* test_fun)()

Definition at line 48 of file arb_perf_test.cxx.

Function Documentation

static void iterate ( GBDATA gbd)
static

Definition at line 26 of file arb_perf_test.cxx.

References GB_child(), and GB_nextChild().

Referenced by test_GB_iterate_DB().

static void test_GB_iterate_DB ( )
static

Definition at line 32 of file arb_perf_test.cxx.

References iterate().

static void test_GB_find_string ( )
static

Definition at line 35 of file arb_perf_test.cxx.

References GB_find_string(), GB_IGNORE_CASE, and SEARCH_GRANDCHILD.

static void test_GB_find_string_indexed ( )
static

Definition at line 38 of file arb_perf_test.cxx.

References GB_find_string(), GB_IGNORE_CASE, and SEARCH_GRANDCHILD.

static void noop ( )
static

Definition at line 45 of file arb_perf_test.cxx.

Referenced by callDelay().

static long callDelay ( long  loops)
static
static long run_test ( test_fun  fun,
long  loops,
double *  perCall 
)
static

Definition at line 72 of file arb_perf_test.cxx.

References callDelay(), NULp, and SECOND.

Referenced by ARB_main(), callDelay(), and estimate_loops().

static long estimate_loops ( test_fun  fun)
static

Definition at line 113 of file arb_perf_test.cxx.

References run_test(), and WANTED_TIME.

Referenced by ARB_main().

static long count_elements ( GBDATA gbd)
static

Definition at line 130 of file arb_perf_test.cxx.

References GB_child(), and GB_nextChild().

Referenced by ARB_main().

int ARB_main ( int  argc,
char argv[] 
)

Variable Documentation

GBDATA* gb_species_data = NULp
static

Definition at line 20 of file arb_perf_test.cxx.

GBDATA* gb_main = NULp
static

Definition at line 21 of file arb_perf_test.cxx.

Test Test[]
static
Initial value:
= {
TEST(GB_iterate_DB),
TEST(GB_find_string_indexed),
{ NULp, NULp },
}
#define TEST(fun)
GBDATA * GB_find_string(GBDATA *gbd, const char *key, const char *str, GB_CASE case_sens, GB_SEARCH_TYPE gbs)
Definition: adquery.cxx:302
#define NULp
Definition: cxxforward.h:97

Definition at line 57 of file arb_perf_test.cxx.