Skip to content

File unittests_snapshot.c

FileList > cubrid > src > executables > unittests_snapshot.c

Go to the source code of this file

  • #include "porting.h"
  • #include "thread_manager.hpp"
  • #include <stdio.h>
  • #include <pthread.h>
  • #include <log_impl.h>
  • #include <sys/time.h>

Public Static Attributes

Type Name
UINT64 count_complete = 0
UINT64 count_oldest = 0
UINT64 count_snapshots = 0
struct timeval start_time

Public Functions

Type Name
int main (int argc, char ** argv)
THREAD_RET_T THREAD_CALLING_CONVENTION test_mvcc_get_oldest (void * param)
THREAD_RET_T THREAD_CALLING_CONVENTION test_mvcc_get_snapshot (void * param)
THREAD_RET_T THREAD_CALLING_CONVENTION test_new_mvcc_complete (void * param)

Public Static Functions

Type Name
void begin (char * test_name)
void logtb_finalize_mvcc_testing (THREAD_ENTRY ** thread_array)
void logtb_finalize_mvcctable ()
int logtb_initialize_mvcc_testing (int num_threads, THREAD_ENTRY ** thread_array)
void logtb_initialize_mvcctable (void)
void logtb_initialize_tdes_for_mvcc_testing (LOG_TDES * tdes, int tran_index)
int logtb_tran_btid_hash_cmp_func (const void * key1, const void * key2)
unsigned int logtb_tran_btid_hash_func (const void * key, const unsigned int ht_size)
int success ()
int test_mvcc_operations (int num_snapshot_threads, int num_complete_threads, int num_oldest_mvccid_threads, THREAD_ENTRY * thread_array)

Macros

Type Name
define MAX_COMPLETE_THREADS 10
define MAX_OLDEST_THREADS 1
define MAX_SNAPSHOT_THREADS 10
define MAX_THREADS 100
define MSG_LEN 40
define MVCC_BITAREA_BITS_TO_BYTES (count_bits) (((([**count\_bits**](unittests__bit_8c.md#function-count_bits)) + 63) &gt;&gt; 6) &lt;&lt; 3)
define MVCC_BITAREA_BITS_TO_ELEMENTS (count_bits) ((([**count\_bits**](unittests__bit_8c.md#function-count_bits)) + 63) &gt;&gt; 6)
define MVCC_BITAREA_BIT_ACTIVE 0
define MVCC_BITAREA_BIT_COMMITTED 1
define MVCC_BITAREA_ELEMENTS_AFTER_FULL_CLEANUP 16
define MVCC_BITAREA_ELEMENTS_TO_BITS (count_elements) (([**count\_elements**](broker__monitor_8c.md#function-timeout)) &lt;&lt; 6)
define MVCC_BITAREA_ELEMENTS_TO_BYTES (count_elements) (([**count\_elements**](broker__monitor_8c.md#function-timeout)) &lt;&lt; 3)
define MVCC_BITAREA_ELEMENT_ALL_COMMITTED 0xffffffffffffffffULL
define MVCC_BITAREA_ELEMENT_BITS 64
define MVCC_BITAREA_MAXIMUM_BITS 32000
define MVCC_BITAREA_MAXIMUM_ELEMENTS 500
define NOPS_COMPLPETE 1000000
define NOPS_OLDEST 2000000
define NOPS_SNAPSHOT 1000000
define strlen (s1) (([**int**](broker__monitor_8c.md#function-timeout)) strlen([**s1**](broker__monitor_8c.md#function-timeout)))

Public Static Attributes Documentation

variable count_complete

UINT64 count_complete;

variable count_oldest

UINT64 count_oldest;

variable count_snapshots

UINT64 count_snapshots;

variable start_time

struct timeval start_time;

Public Functions Documentation

function main

int main (
    int argc,
    char ** argv
) 

function test_mvcc_get_oldest

THREAD_RET_T  THREAD_CALLING_CONVENTION test_mvcc_get_oldest (
    void * param
) 

function test_mvcc_get_snapshot

THREAD_RET_T  THREAD_CALLING_CONVENTION test_mvcc_get_snapshot (
    void * param
) 

function test_new_mvcc_complete

THREAD_RET_T  THREAD_CALLING_CONVENTION test_new_mvcc_complete (
    void * param
) 

Public Static Functions Documentation

function begin

static void begin (
    char * test_name
) 

function logtb_finalize_mvcc_testing

static void logtb_finalize_mvcc_testing (
    THREAD_ENTRY ** thread_array
) 

function logtb_finalize_mvcctable

static void logtb_finalize_mvcctable () 

function logtb_initialize_mvcc_testing

static int logtb_initialize_mvcc_testing (
    int num_threads,
    THREAD_ENTRY ** thread_array
) 

function logtb_initialize_mvcctable

static void logtb_initialize_mvcctable (
    void
) 

function logtb_initialize_tdes_for_mvcc_testing

static void logtb_initialize_tdes_for_mvcc_testing (
    LOG_TDES * tdes,
    int tran_index
) 

function logtb_tran_btid_hash_cmp_func

static int logtb_tran_btid_hash_cmp_func (
    const  void * key1,
    const  void * key2
) 

function logtb_tran_btid_hash_func

static unsigned  int logtb_tran_btid_hash_func (
    const  void * key,
    const  unsigned  int ht_size
) 

function success

static int success () 

function test_mvcc_operations

static int test_mvcc_operations (
    int num_snapshot_threads,
    int num_complete_threads,
    int num_oldest_mvccid_threads,
    THREAD_ENTRY * thread_array
) 

Macro Definition Documentation

define MAX_COMPLETE_THREADS

#define MAX_COMPLETE_THREADS `10`

define MAX_OLDEST_THREADS

#define MAX_OLDEST_THREADS `1`

define MAX_SNAPSHOT_THREADS

#define MAX_SNAPSHOT_THREADS `10`

define MAX_THREADS

#define MAX_THREADS `100`

define MSG_LEN

#define MSG_LEN `40`

define MVCC_BITAREA_BITS_TO_BYTES

#define MVCC_BITAREA_BITS_TO_BYTES (
    count_bits
) `(((( count_bits ) + 63) >> 6) << 3)`

define MVCC_BITAREA_BITS_TO_ELEMENTS

#define MVCC_BITAREA_BITS_TO_ELEMENTS (
    count_bits
) `((( count_bits ) + 63) >> 6)`

define MVCC_BITAREA_BIT_ACTIVE

#define MVCC_BITAREA_BIT_ACTIVE `0`

define MVCC_BITAREA_BIT_COMMITTED

#define MVCC_BITAREA_BIT_COMMITTED `1`

define MVCC_BITAREA_ELEMENTS_AFTER_FULL_CLEANUP

#define MVCC_BITAREA_ELEMENTS_AFTER_FULL_CLEANUP `16`

define MVCC_BITAREA_ELEMENTS_TO_BITS

#define MVCC_BITAREA_ELEMENTS_TO_BITS (
    count_elements
) `(( count_elements ) << 6)`

define MVCC_BITAREA_ELEMENTS_TO_BYTES

#define MVCC_BITAREA_ELEMENTS_TO_BYTES (
    count_elements
) `(( count_elements ) << 3)`

define MVCC_BITAREA_ELEMENT_ALL_COMMITTED

#define MVCC_BITAREA_ELEMENT_ALL_COMMITTED `0xffffffffffffffffULL`

define MVCC_BITAREA_ELEMENT_BITS

#define MVCC_BITAREA_ELEMENT_BITS `64`

define MVCC_BITAREA_MAXIMUM_BITS

#define MVCC_BITAREA_MAXIMUM_BITS `32000`

define MVCC_BITAREA_MAXIMUM_ELEMENTS

#define MVCC_BITAREA_MAXIMUM_ELEMENTS `500`

define NOPS_COMPLPETE

#define NOPS_COMPLPETE `1000000`

define NOPS_OLDEST

#define NOPS_OLDEST `2000000`

define NOPS_SNAPSHOT

#define NOPS_SNAPSHOT `1000000`

define strlen

#define strlen (
    s1
) `(( int ) strlen( s1 ))`


The documentation for this class was generated from the following file cubrid/src/executables/unittests_snapshot.c