libjf API reference guide

Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

jf_bench.c File Reference

#include <jf/jf_config.h>
#include <jf_file.h>
#include <jf/jf_timer.h>
#include <jf/jf_patches.h>

Go to the source code of this file.

Data Structures

struct  bench_table_rec_s
struct  bench_table_t
struct  bench_test_func_s
struct  bench_test_time_s

Defines

#define BENCH_00_SIO_BLOCKS_FAST   (100 * BENCH_00_SIO_BLOCKS_SAFE)
#define BENCH_00_SIO_BLOCKS_SAFE   100
#define BENCH_TEST_MAX_RECSIZE   (bench_test_recsize_array[BENCH_TEST_RECSIZES -1 ])
#define BENCH_TEST_NUMFILES   (sizeof(bench_test_numfile_array)/sizeof(int))
#define BENCH_TEST_RECNUMS   (sizeof(bench_test_recnum_array)/sizeof(int))
#define BENCH_TEST_RECSIZES   (sizeof(bench_test_recsize_array)/sizeof(size_t))
#define BENCH_TEST_REPETITIONS   12
#define BENCH_TEST_TESTYPES   (sizeof(bench_test_func_array)/sizeof(struct bench_test_func_s))
#define BENCH_TEST_TRANSACTIONS   25
#define BENCH_TEST_UPDATE_FACTOR   100
#define JF_TRACE_MODULE   JF_TRACE_MOD_PRG_UTILS
#define VERBOSE_MODE_MAX   3
#define VERBOSE_MODE_MID   2
#define VERBOSE_MODE_MIN   1
#define VERBOSE_MODE_SIL   0

Typedefs

typedef int(* bench_func_post_t )(bench_table_t *bt)
typedef int(* bench_func_pre_t )(bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
typedef int(* bench_func_run_t )(bench_table_t *bt, const void *buffer, size_t block_size, int record_num)

Functions

int bench_00_ljf_post (bench_table_t *bt)
int bench_00_ljf_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_00_ljf_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_00_sio_post (bench_table_t *bt)
int bench_00_sio_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_00_sio_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_01_ljf_post (bench_table_t *bt)
int bench_01_ljf_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_01_ljf_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_01_sio_post (bench_table_t *bt)
int bench_01_sio_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_01_sio_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_02_ljf_post (bench_table_t *bt)
int bench_02_ljf_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_02_ljf_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_02_sio_post (bench_table_t *bt)
int bench_02_sio_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_02_sio_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_03_ljf_post (bench_table_t *bt)
int bench_03_ljf_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_03_ljf_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_03_sio_post (bench_table_t *bt)
int bench_03_sio_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
int bench_03_sio_run (bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
int bench_table_create (bench_table_t *bt, const char *path_prefix, int number_of_files)
int bench_table_destroy (bench_table_t *bt)
jf_file_tbench_table_get_jfile (bench_table_t *bt, int i)
jf_journal_tbench_table_get_journal (bench_table_t *bt)
int bench_table_get_last (const bench_table_t *bt)
const char * bench_table_get_name (const bench_table_t *bt, int i)
uint32_t bench_table_get_policy (const bench_table_t *bt)
FILE * bench_table_get_stream (bench_table_t *bt, int i)
void bench_table_reset (bench_table_t *bt)
int bench_table_set_jfile (bench_table_t *bt, int i, jf_file_t *jf)
void bench_table_set_journal (bench_table_t *bt, jf_journal_t *j)
void bench_table_set_policy (bench_table_t *bt, uint32_t policy)
int bench_table_set_stream (bench_table_t *bt, int i, FILE *stream)
int bench_table_unlink (const bench_table_t *bt)
void bench_test_results_clean (bench_test_results_t btr)
int bench_test_results_compute (bench_test_results_t btr)
int bench_test_results_compute_one (bench_test_results_t btr, int repetition, int number_of_file, int record_size, int record_num, int test_type)
void bench_test_results_report (bench_test_results_t btr)
void bench_test_results_reset (bench_test_results_t btr)
void bench_test_time_reset (struct bench_test_time_s *btt)
int bench_X0_ljf_post (bench_table_t *bt)
int bench_X0_ljf_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, uint32_t policy, const char *open_mode)
int bench_X0_sio_post (bench_table_t *bt)
int bench_X0_sio_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, uint32_t policy, const char *open_mode)
int bench_X1_ljf_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy, const char *open_mode)
int bench_X1_sio_pre (bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy, const char *open_mode)
int main (int argc, char *argv[])
void print_help (char *arg)

Variables

const char * bench_file_name = "jf_bench_file_"
bench_test_func_s bench_test_func_array []
int bench_test_numfile_array []
int bench_test_recnum_array []
size_t bench_test_recsize_array []
bench_test_time_s bench_test_results_t [BENCH_TEST_REPETITIONS][BENCH_TEST_NUMFILES][BENCH_TEST_RECSIZES][BENCH_TEST_RECNUMS][BENCH_TEST_TESTYPES]
void * buffer = NULL
char * csv_file_name = NULL
char * path_prefix = NULL
uint32_t sync_type = JF_JOURNAL_PROP_SYNC_SAFE
long verbose_mode = VERBOSE_MODE_MIN
char * xml_file_name = NULL


Define Documentation

#define BENCH_00_SIO_BLOCKS_FAST   (100 * BENCH_00_SIO_BLOCKS_SAFE)
 

Definition at line 170 of file jf_bench.c.

#define BENCH_00_SIO_BLOCKS_SAFE   100
 

Definition at line 169 of file jf_bench.c.

#define BENCH_TEST_MAX_RECSIZE   (bench_test_recsize_array[BENCH_TEST_RECSIZES -1 ])
 

Definition at line 329 of file jf_bench.c.

Referenced by bench_01_ljf_run(), bench_01_sio_run(), bench_03_ljf_run(), and bench_03_sio_run().

#define BENCH_TEST_NUMFILES   (sizeof(bench_test_numfile_array)/sizeof(int))
 

Definition at line 345 of file jf_bench.c.

Referenced by bench_test_results_clean(), bench_test_results_compute(), bench_test_results_report(), and bench_test_results_reset().

#define BENCH_TEST_RECNUMS   (sizeof(bench_test_recnum_array)/sizeof(int))
 

Definition at line 337 of file jf_bench.c.

Referenced by bench_test_results_clean(), bench_test_results_compute(), bench_test_results_report(), and bench_test_results_reset().

#define BENCH_TEST_RECSIZES   (sizeof(bench_test_recsize_array)/sizeof(size_t))
 

Definition at line 327 of file jf_bench.c.

Referenced by bench_test_results_clean(), bench_test_results_compute(), bench_test_results_report(), bench_test_results_reset(), and main().

#define BENCH_TEST_REPETITIONS   12
 

Definition at line 294 of file jf_bench.c.

Referenced by bench_test_results_clean(), bench_test_results_compute(), bench_test_results_report(), and bench_test_results_reset().

#define BENCH_TEST_TESTYPES   (sizeof(bench_test_func_array)/sizeof(struct bench_test_func_s))
 

Definition at line 319 of file jf_bench.c.

Referenced by bench_test_results_clean(), bench_test_results_compute(), bench_test_results_report(), and bench_test_results_reset().

#define BENCH_TEST_TRANSACTIONS   25
 

Definition at line 297 of file jf_bench.c.

Referenced by bench_test_results_compute_one(), and bench_test_results_report().

#define BENCH_TEST_UPDATE_FACTOR   100
 

Definition at line 302 of file jf_bench.c.

Referenced by bench_02_ljf_run(), bench_02_sio_run(), bench_03_ljf_run(), bench_03_sio_run(), bench_X1_ljf_pre(), and bench_X1_sio_pre().

#define JF_TRACE_MODULE   JF_TRACE_MOD_PRG_UTILS
 

Definition at line 44 of file jf_bench.c.

#define VERBOSE_MODE_MAX   3
 

Definition at line 55 of file jf_bench.c.

Referenced by bench_test_results_compute_one().

#define VERBOSE_MODE_MID   2
 

Definition at line 54 of file jf_bench.c.

Referenced by bench_test_results_compute_one().

#define VERBOSE_MODE_MIN   1
 

Definition at line 53 of file jf_bench.c.

Referenced by bench_test_results_report().

#define VERBOSE_MODE_SIL   0
 

Definition at line 52 of file jf_bench.c.

Referenced by bench_test_results_report().


Typedef Documentation

typedef int(* bench_func_post_t)(bench_table_t *bt)
 

Definition at line 266 of file jf_bench.c.

typedef int(* bench_func_pre_t)(bench_table_t *bt, const char *path_prefix, int number_of_files, size_t block_size, int record_num, uint32_t policy)
 

Definition at line 258 of file jf_bench.c.

typedef int(* bench_func_run_t)(bench_table_t *bt, const void *buffer, size_t block_size, int record_num)
 

Definition at line 263 of file jf_bench.c.


Function Documentation

int bench_00_ljf_post bench_table_t bt  ) 
 

Definition at line 1528 of file jf_bench.c.

References bench_X0_ljf_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_00_ljf_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 1512 of file jf_bench.c.

References bench_X0_ljf_pre(), JF_RC_INTERNAL_ERROR, JF_TRACE, and path_prefix.

int bench_00_ljf_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 1540 of file jf_bench.c.

References bench_table_get_jfile(), bench_table_get_journal(), bench_table_get_last(), buffer, CATCH, jf_file_write(), jf_journal_commit(), JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, and THROW.

int bench_00_sio_post bench_table_t bt  ) 
 

Definition at line 1447 of file jf_bench.c.

References bench_X0_sio_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_00_sio_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 1432 of file jf_bench.c.

References bench_X0_sio_pre(), JF_RC_INTERNAL_ERROR, JF_TRACE, and path_prefix.

int bench_00_sio_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 1459 of file jf_bench.c.

References bench_table_get_last(), bench_table_get_policy(), bench_table_get_stream(), buffer, CATCH, JF_RC_FWRITE_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_stream_sync(), JF_TRACE, and THROW.

int bench_01_ljf_post bench_table_t bt  ) 
 

Definition at line 1702 of file jf_bench.c.

References bench_X0_ljf_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_01_ljf_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 1686 of file jf_bench.c.

References bench_X0_ljf_pre(), JF_RC_INTERNAL_ERROR, JF_TRACE, and path_prefix.

int bench_01_ljf_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 1714 of file jf_bench.c.

References bench_table_get_jfile(), bench_table_get_journal(), bench_table_get_last(), BENCH_TEST_MAX_RECSIZE, buffer, byte_t, CATCH, jf_file_read(), jf_file_seek(), jf_file_write(), jf_journal_commit(), jf_offset_t, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, and THROW.

int bench_01_sio_post bench_table_t bt  ) 
 

Definition at line 1604 of file jf_bench.c.

References bench_X0_sio_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_01_sio_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 1588 of file jf_bench.c.

References bench_X0_sio_pre(), JF_RC_INTERNAL_ERROR, JF_TRACE, and path_prefix.

int bench_01_sio_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 1616 of file jf_bench.c.

References bench_table_get_last(), bench_table_get_policy(), bench_table_get_stream(), BENCH_TEST_MAX_RECSIZE, buffer, byte_t, CATCH, fseeko, JF_RC_FREAD_ERROR, JF_RC_FSEEK_ERROR, JF_RC_FWRITE_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_stream_sync(), JF_TRACE, and THROW.

int bench_02_ljf_post bench_table_t bt  ) 
 

Definition at line 1929 of file jf_bench.c.

References bench_X0_ljf_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_02_ljf_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 1872 of file jf_bench.c.

References bench_table_get_jfile(), bench_table_get_journal(), bench_table_get_last(), bench_X1_ljf_pre(), buffer, CATCH, jf_file_write(), jf_journal_commit(), JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, path_prefix, and THROW.

int bench_02_ljf_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 1941 of file jf_bench.c.

References bench_table_get_jfile(), bench_table_get_journal(), bench_table_get_last(), BENCH_TEST_UPDATE_FACTOR, buffer, CATCH, jf_file_seek(), jf_file_write(), jf_journal_commit(), jf_offset_t, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, and THROW.

int bench_02_sio_post bench_table_t bt  ) 
 

Definition at line 1794 of file jf_bench.c.

References bench_X0_sio_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_02_sio_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 1778 of file jf_bench.c.

References bench_X1_sio_pre(), JF_RC_INTERNAL_ERROR, JF_TRACE, and path_prefix.

int bench_02_sio_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 1806 of file jf_bench.c.

References bench_table_get_last(), bench_table_get_policy(), bench_table_get_stream(), BENCH_TEST_UPDATE_FACTOR, buffer, CATCH, fseeko, JF_RC_FSEEK_ERROR, JF_RC_FWRITE_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_stream_sync(), JF_TRACE, and THROW.

int bench_03_ljf_post bench_table_t bt  ) 
 

Definition at line 2125 of file jf_bench.c.

References bench_X0_ljf_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_03_ljf_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 2109 of file jf_bench.c.

References bench_X1_ljf_pre(), JF_RC_INTERNAL_ERROR, JF_TRACE, and path_prefix.

int bench_03_ljf_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 2137 of file jf_bench.c.

References bench_table_get_jfile(), bench_table_get_journal(), bench_table_get_last(), BENCH_TEST_MAX_RECSIZE, BENCH_TEST_UPDATE_FACTOR, buffer, byte_t, CATCH, jf_file_read(), jf_file_seek(), jf_file_write(), jf_journal_commit(), jf_offset_t, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, and THROW.

int bench_03_sio_post bench_table_t bt  ) 
 

Definition at line 2017 of file jf_bench.c.

References bench_X0_sio_post(), JF_RC_INTERNAL_ERROR, and JF_TRACE.

int bench_03_sio_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy
 

Definition at line 2001 of file jf_bench.c.

References bench_X1_sio_pre(), JF_RC_INTERNAL_ERROR, JF_TRACE, and path_prefix.

int bench_03_sio_run bench_table_t bt,
const void *  buffer,
size_t  block_size,
int  record_num
 

Definition at line 2029 of file jf_bench.c.

References bench_table_get_last(), bench_table_get_policy(), bench_table_get_stream(), BENCH_TEST_MAX_RECSIZE, BENCH_TEST_UPDATE_FACTOR, buffer, byte_t, CATCH, fseeko, JF_RC_FREAD_ERROR, JF_RC_FSEEK_ERROR, JF_RC_FWRITE_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_stream_sync(), JF_TRACE, and THROW.

int bench_table_create bench_table_t bt,
const char *  path_prefix,
int  number_of_files
 

Definition at line 486 of file jf_bench.c.

References bench_file_name, CATCH, JF_RC_INTERNAL_ERROR, JF_RC_INVALID_OPTION, JF_RC_INVALID_STATUS, JF_RC_MALLOC_ERROR, JF_RC_OK, JF_TRACE, bench_table_t::last, bench_table_rec_s::name, path_prefix, bench_table_t::records, and THROW.

Referenced by bench_X0_ljf_pre(), and bench_X0_sio_pre().

int bench_table_destroy bench_table_t bt  ) 
 

Definition at line 585 of file jf_bench.c.

References JF_TRACE, bench_table_t::last, bench_table_rec_s::name, and bench_table_t::records.

Referenced by bench_X0_ljf_post(), and bench_X0_sio_post().

jf_file_t* bench_table_get_jfile bench_table_t bt,
int  i
[inline, static]
 

Definition at line 131 of file jf_bench.c.

References bench_table_rec_s::jfile, bench_table_t::last, and bench_table_t::records.

Referenced by bench_00_ljf_run(), bench_01_ljf_run(), bench_02_ljf_pre(), bench_02_ljf_run(), bench_03_ljf_run(), bench_X0_ljf_post(), and bench_X1_ljf_pre().

jf_journal_t* bench_table_get_journal bench_table_t bt  )  [inline, static]
 

Definition at line 152 of file jf_bench.c.

References bench_table_t::journal.

Referenced by bench_00_ljf_run(), bench_01_ljf_run(), bench_02_ljf_pre(), bench_02_ljf_run(), bench_03_ljf_run(), bench_X0_ljf_post(), bench_X0_ljf_pre(), and bench_X1_ljf_pre().

int bench_table_get_last const bench_table_t bt  )  [inline, static]
 

Definition at line 84 of file jf_bench.c.

References bench_table_t::last.

Referenced by bench_00_ljf_run(), bench_00_sio_run(), bench_01_ljf_run(), bench_01_sio_run(), bench_02_ljf_pre(), bench_02_ljf_run(), bench_02_sio_run(), bench_03_ljf_run(), bench_03_sio_run(), bench_X0_ljf_post(), bench_X0_ljf_pre(), bench_X0_sio_post(), bench_X0_sio_pre(), bench_X1_ljf_pre(), and bench_X1_sio_pre().

const char* bench_table_get_name const bench_table_t bt,
int  i
[inline, static]
 

Definition at line 89 of file jf_bench.c.

References bench_table_t::last, bench_table_rec_s::name, and bench_table_t::records.

Referenced by bench_X0_ljf_pre(), and bench_X0_sio_pre().

uint32_t bench_table_get_policy const bench_table_t bt  )  [inline, static]
 

Definition at line 157 of file jf_bench.c.

References bench_table_t::policy.

Referenced by bench_00_sio_run(), bench_01_sio_run(), bench_02_sio_run(), bench_03_sio_run(), and bench_X1_sio_pre().

FILE* bench_table_get_stream bench_table_t bt,
int  i
[inline, static]
 

Definition at line 111 of file jf_bench.c.

References bench_table_t::last, bench_table_t::records, and bench_table_rec_s::stream.

Referenced by bench_00_sio_run(), bench_01_sio_run(), bench_02_sio_run(), bench_03_sio_run(), bench_X0_sio_post(), and bench_X1_sio_pre().

void bench_table_reset bench_table_t bt  )  [inline, static]
 

Definition at line 140 of file jf_bench.c.

References bench_table_t::last, bench_table_t::policy, and bench_table_t::records.

Referenced by bench_X0_ljf_post(), bench_X0_ljf_pre(), bench_X0_sio_post(), and bench_X0_sio_pre().

int bench_table_set_jfile bench_table_t bt,
int  i,
jf_file_t jf
[inline, static]
 

Definition at line 120 of file jf_bench.c.

References JF_RC_OK, JF_RC_OUT_OF_RANGE, bench_table_rec_s::jfile, bench_table_t::last, and bench_table_t::records.

Referenced by bench_X0_ljf_pre().

void bench_table_set_journal bench_table_t bt,
jf_journal_t j
[inline, static]
 

Definition at line 147 of file jf_bench.c.

References bench_table_t::journal.

Referenced by bench_X0_ljf_pre().

void bench_table_set_policy bench_table_t bt,
uint32_t  policy
[inline, static]
 

Definition at line 162 of file jf_bench.c.

References bench_table_t::policy.

Referenced by bench_X0_ljf_pre(), and bench_X0_sio_pre().

int bench_table_set_stream bench_table_t bt,
int  i,
FILE *  stream
[inline, static]
 

Definition at line 100 of file jf_bench.c.

References JF_RC_OK, JF_RC_OUT_OF_RANGE, bench_table_t::last, bench_table_t::records, and bench_table_rec_s::stream.

Referenced by bench_X0_sio_pre().

int bench_table_unlink const bench_table_t bt  ) 
 

Definition at line 549 of file jf_bench.c.

References CATCH, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_RC_UNLINK_ERROR, JF_TRACE, bench_table_t::last, bench_table_rec_s::name, bench_table_t::records, and THROW.

Referenced by bench_X0_ljf_post(), bench_X0_ljf_pre(), bench_X0_sio_post(), and bench_X0_sio_pre().

void bench_test_results_clean bench_test_results_t  btr  ) 
 

Definition at line 827 of file jf_bench.c.

References BENCH_TEST_NUMFILES, BENCH_TEST_RECNUMS, BENCH_TEST_RECSIZES, BENCH_TEST_REPETITIONS, BENCH_TEST_TESTYPES, and FALSE.

Referenced by main().

int bench_test_results_compute bench_test_results_t  btr  ) 
 

Definition at line 632 of file jf_bench.c.

References BENCH_TEST_NUMFILES, BENCH_TEST_RECNUMS, BENCH_TEST_RECSIZES, BENCH_TEST_REPETITIONS, bench_test_results_compute_one(), BENCH_TEST_TESTYPES, CATCH, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, and THROW.

Referenced by main().

int bench_test_results_compute_one bench_test_results_t  btr,
int  repetition,
int  number_of_file,
int  record_size,
int  record_num,
int  test_type
 

Definition at line 672 of file jf_bench.c.

References bench_test_func_array, bench_test_numfile_array, bench_test_recnum_array, bench_test_recsize_array, BENCH_TEST_TRANSACTIONS, buffer, CATCH, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_timer_get_ela_time(), jf_timer_get_sys_time(), jf_timer_get_usr_time(), jf_timer_reset(), jf_timer_start(), jf_timer_stop(), JF_TRACE, path_prefix, SIZE_T_FORMAT, sync_type, THROW, TRUE, verbose_mode, VERBOSE_MODE_MAX, and VERBOSE_MODE_MID.

Referenced by bench_test_results_compute().

void bench_test_results_report bench_test_results_t  btr  ) 
 

Definition at line 884 of file jf_bench.c.

References bench_test_func_array, bench_test_numfile_array, BENCH_TEST_NUMFILES, bench_test_recnum_array, BENCH_TEST_RECNUMS, bench_test_recsize_array, BENCH_TEST_RECSIZES, BENCH_TEST_REPETITIONS, BENCH_TEST_TESTYPES, BENCH_TEST_TRANSACTIONS, csv_file_name, bench_test_func_s::ratio_multiplier, SIZE_T_FORMAT, verbose_mode, VERBOSE_MODE_MIN, VERBOSE_MODE_SIL, and xml_file_name.

Referenced by main().

void bench_test_results_reset bench_test_results_t  btr  ) 
 

Definition at line 616 of file jf_bench.c.

References BENCH_TEST_NUMFILES, BENCH_TEST_RECNUMS, BENCH_TEST_RECSIZES, BENCH_TEST_REPETITIONS, BENCH_TEST_TESTYPES, and bench_test_time_reset().

Referenced by main().

void bench_test_time_reset struct bench_test_time_s btt  ) 
 

Definition at line 607 of file jf_bench.c.

References FALSE, bench_test_time_s::ljf_ela, bench_test_time_s::ljf_sys, bench_test_time_s::ljf_usr, bench_test_time_s::sio_ela, bench_test_time_s::sio_sys, bench_test_time_s::sio_usr, and bench_test_time_s::valid.

Referenced by bench_test_results_reset().

int bench_X0_ljf_post bench_table_t bt  ) 
 

Definition at line 1256 of file jf_bench.c.

References bench_table_destroy(), bench_table_get_jfile(), bench_table_get_journal(), bench_table_get_last(), bench_table_reset(), bench_table_unlink(), CATCH, jf_file_close(), jf_journal_close(), JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, and THROW.

Referenced by bench_00_ljf_post(), bench_01_ljf_post(), bench_02_ljf_post(), and bench_03_ljf_post().

int bench_X0_ljf_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
uint32_t  policy,
const char *  open_mode
 

Definition at line 1169 of file jf_bench.c.

References bench_table_create(), bench_table_get_journal(), bench_table_get_last(), bench_table_get_name(), bench_table_reset(), bench_table_set_jfile(), bench_table_set_journal(), bench_table_set_policy(), bench_table_unlink(), CATCH, jf_journal_opts_s::flags, jf_file_open(), jf_journal_open(), JF_JOURNAL_PROP_OPEN_O_CREAT, JF_JOURNAL_PROP_OPEN_O_EXCL, JF_RC_FOPEN_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_set_default_file_open_opts(), jf_set_default_journal_opts(), JF_TRACE, jf_file_open_opts_s::join_the_journal, path_prefix, THROW, and TRUE.

Referenced by bench_00_ljf_pre(), bench_01_ljf_pre(), and bench_X1_ljf_pre().

int bench_X0_sio_post bench_table_t bt  ) 
 

Definition at line 1119 of file jf_bench.c.

References bench_table_destroy(), bench_table_get_last(), bench_table_get_stream(), bench_table_reset(), bench_table_unlink(), CATCH, JF_RC_FCLOSE_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, and THROW.

Referenced by bench_00_sio_post(), bench_01_sio_post(), bench_02_sio_post(), and bench_03_sio_post().

int bench_X0_sio_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
uint32_t  policy,
const char *  open_mode
 

Definition at line 1057 of file jf_bench.c.

References bench_table_create(), bench_table_get_last(), bench_table_get_name(), bench_table_reset(), bench_table_set_policy(), bench_table_set_stream(), bench_table_unlink(), CATCH, JF_RC_FOPEN_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, path_prefix, and THROW.

Referenced by bench_00_sio_pre(), bench_01_sio_pre(), and bench_X1_sio_pre().

int bench_X1_ljf_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy,
const char *  open_mode
 

Definition at line 1374 of file jf_bench.c.

References bench_table_get_jfile(), bench_table_get_journal(), bench_table_get_last(), BENCH_TEST_UPDATE_FACTOR, bench_X0_ljf_pre(), buffer, CATCH, jf_file_write(), jf_journal_commit(), JF_RC_INTERNAL_ERROR, JF_RC_OK, JF_TRACE, path_prefix, and THROW.

Referenced by bench_02_ljf_pre(), and bench_03_ljf_pre().

int bench_X1_sio_pre bench_table_t bt,
const char *  path_prefix,
int  number_of_files,
size_t  block_size,
int  record_num,
uint32_t  policy,
const char *  open_mode
 

Definition at line 1311 of file jf_bench.c.

References bench_table_get_last(), bench_table_get_policy(), bench_table_get_stream(), BENCH_TEST_UPDATE_FACTOR, bench_X0_sio_pre(), buffer, CATCH, JF_RC_FWRITE_ERROR, JF_RC_INTERNAL_ERROR, JF_RC_OK, jf_stream_sync(), JF_TRACE, path_prefix, and THROW.

Referenced by bench_02_sio_pre(), and bench_03_sio_pre().

int main int  argc,
char *  argv[]
 

Definition at line 384 of file jf_bench.c.

References bench_test_recsize_array, BENCH_TEST_RECSIZES, bench_test_results_clean(), bench_test_results_compute(), bench_test_results_report(), bench_test_results_reset(), bench_test_results_t, buffer, csv_file_name, getopt(), JF_JOURNAL_PROP_SYNC_FAST, JF_RC_OK, jf_strerror(), optarg, path_prefix, print_help(), sync_type, verbose_mode, and xml_file_name.

void print_help char *  arg  ) 
 

Definition at line 470 of file jf_bench.c.


Variable Documentation

const char* bench_file_name = "jf_bench_file_"
 

Definition at line 57 of file jf_bench.c.

Referenced by bench_table_create().

struct bench_test_func_s bench_test_func_array[] [static]
 

Initial value:

Definition at line 304 of file jf_bench.c.

Referenced by bench_test_results_compute_one(), and bench_test_results_report().

int bench_test_numfile_array[] [static]
 

Initial value:

{ 1, 5 }
Definition at line 341 of file jf_bench.c.

Referenced by bench_test_results_compute_one(), and bench_test_results_report().

int bench_test_recnum_array[] [static]
 

Initial value:

{ 1, 10, 100 }
Definition at line 333 of file jf_bench.c.

Referenced by bench_test_results_compute_one(), and bench_test_results_report().

size_t bench_test_recsize_array[] [static]
 

Initial value:

{ 16, 256, 4096 }
Definition at line 323 of file jf_bench.c.

Referenced by bench_test_results_compute_one(), bench_test_results_report(), and main().

struct bench_test_time_s bench_test_results_t[BENCH_TEST_REPETITIONS][BENCH_TEST_NUMFILES][BENCH_TEST_RECSIZES][BENCH_TEST_RECNUMS][BENCH_TEST_TESTYPES]
 

Definition at line 347 of file jf_bench.c.

Referenced by main().

void* buffer = NULL [static]
 

Definition at line 380 of file jf_bench.c.

Referenced by bench_00_ljf_run(), bench_00_sio_run(), bench_01_ljf_run(), bench_01_sio_run(), bench_02_ljf_pre(), bench_02_ljf_run(), bench_02_sio_run(), bench_03_ljf_run(), bench_03_sio_run(), bench_test_results_compute_one(), bench_X1_ljf_pre(), bench_X1_sio_pre(), and main().

char* csv_file_name = NULL [static]
 

Definition at line 378 of file jf_bench.c.

Referenced by bench_test_results_report(), and main().

char* path_prefix = NULL [static]
 

Definition at line 377 of file jf_bench.c.

Referenced by bench_00_ljf_pre(), bench_00_sio_pre(), bench_01_ljf_pre(), bench_01_sio_pre(), bench_02_ljf_pre(), bench_02_sio_pre(), bench_03_ljf_pre(), bench_03_sio_pre(), bench_table_create(), bench_test_results_compute_one(), bench_X0_ljf_pre(), bench_X0_sio_pre(), bench_X1_ljf_pre(), bench_X1_sio_pre(), and main().

uint32_t sync_type = JF_JOURNAL_PROP_SYNC_SAFE [static]
 

Definition at line 376 of file jf_bench.c.

Referenced by bench_test_results_compute_one(), and main().

long verbose_mode = VERBOSE_MODE_MIN [static]
 

Definition at line 375 of file jf_bench.c.

Referenced by bench_test_results_compute_one(), bench_test_results_report(), and main().

char* xml_file_name = NULL [static]
 

Definition at line 379 of file jf_bench.c.

Referenced by bench_test_results_report(), and main().


Copyright 2005 © Tiian