Motr  M0
Crate_utils

Macros

#define LOG_PREFIX   "utils:"
 
#define NN   312
 
#define MM   156
 
#define MATRIX_A   0xB5026F5AA96619E9ULL
 
#define UM   0xFFFFFFFF80000000ULL /* Most significant 33 bits */
 
#define LM   0x7FFFFFFFULL /* Least significant 31 bits */
 

Typedefs

typedef unsigned long long bcnt_t
 

Functions

struct m0_realmcrate_uber_realm ()
 
int adopt_motr_thread (struct m0_workload_task *task)
 
void release_motr_thread (struct m0_workload_task *task)
 
static void dix_config_init (struct m0_idx_dix_config *conf)
 
int init (struct workload *w)
 
void free_m0_conf ()
 
int fini (struct workload *w)
 
void check (struct workload *w)
 
unsigned char * calc_md5sum (char *buffer, int blocksize)
 
void init_genrand64 (unsigned long long seed)
 
void init_by_array64 (unsigned long long init_key[], unsigned long long key_length, unsigned long long seed)
 
unsigned long long genrand64_int64 (void)
 
long long genrand64_int63 (void)
 
double genrand64_real1 (void)
 
double genrand64_real2 (void)
 
double genrand64_real3 (void)
 
void init_rand_generator (unsigned long long seed)
 
int generate_fid (int seed, unsigned long *low, unsigned long *high)
 
void timeval_diff (const struct timeval *start, const struct timeval *end, struct timeval *diff)
 
void timeval_add (struct timeval *sum, struct timeval *term)
 
void timeval_sub (struct timeval *end, struct timeval *start)
 
double tsec (const struct timeval *tval)
 
double rate (bcnt_t items, const struct timeval *tval, int scale)
 
unsigned long long getnum (const char *str, const char *msg)
 
void timeval_norm (struct timeval *t)
 

Variables

struct crate_confconf = NULL
 
struct m0_config m0_conf = {}
 
struct m0_idx_cass_config cass_conf = {}
 
static int num_m0_workloads = 0
 
struct m0_clientm0_instance = NULL
 
struct m0_container container = {}
 
static struct m0_realm uber_realm = {}
 
static struct m0_idx_dix_config dix_conf = {}
 
struct m0_clientm0_instance
 
static unsigned long long mt [NN]
 
static int mti = NN+1
 

Detailed Description

Macro Definition Documentation

◆ LM

#define LM   0x7FFFFFFFULL /* Least significant 31 bits */

Definition at line 64 of file crate_utils.c.

◆ LOG_PREFIX

#define LOG_PREFIX   "utils:"

Definition at line 36 of file crate_client_utils.c.

◆ MATRIX_A

#define MATRIX_A   0xB5026F5AA96619E9ULL

Definition at line 62 of file crate_utils.c.

◆ MM

#define MM   156

Definition at line 61 of file crate_utils.c.

◆ NN

#define NN   312

Definition at line 60 of file crate_utils.c.

◆ UM

#define UM   0xFFFFFFFF80000000ULL /* Most significant 33 bits */

Definition at line 63 of file crate_utils.c.

Typedef Documentation

◆ bcnt_t

typedef unsigned long long bcnt_t

Definition at line 44 of file crate_utils.h.

Function Documentation

◆ adopt_motr_thread()

int adopt_motr_thread ( struct m0_workload_task task)

Definition at line 53 of file crate_client_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_md5sum()

unsigned char * calc_md5sum ( char *  buffer,
int  blocksize 
)

Definition at line 53 of file crate_utils.c.

◆ check()

void check ( struct workload w)

Definition at line 171 of file crate_client_utils.c.

Here is the caller graph for this function:

◆ crate_uber_realm()

struct m0_realm * crate_uber_realm ( )

Definition at line 47 of file crate_client_utils.c.

Here is the caller graph for this function:

◆ dix_config_init()

static void dix_config_init ( struct m0_idx_dix_config conf)
static

Definition at line 76 of file crate_client_utils.c.

Here is the caller graph for this function:

◆ fini()

int fini ( struct workload w)

Definition at line 161 of file crate_client_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_m0_conf()

void free_m0_conf ( )

Definition at line 150 of file crate_client_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_fid()

int generate_fid ( int  seed,
unsigned long *  low,
unsigned long *  high 
)

Definition at line 181 of file crate_utils.c.

Here is the call graph for this function:

◆ genrand64_int63()

long long genrand64_int63 ( void  )

Definition at line 150 of file crate_utils.c.

Here is the call graph for this function:

◆ genrand64_int64()

unsigned long long genrand64_int64 ( void  )

Definition at line 112 of file crate_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ genrand64_real1()

double genrand64_real1 ( void  )

Definition at line 156 of file crate_utils.c.

Here is the call graph for this function:

◆ genrand64_real2()

double genrand64_real2 ( void  )

Definition at line 162 of file crate_utils.c.

Here is the call graph for this function:

◆ genrand64_real3()

double genrand64_real3 ( void  )

Definition at line 168 of file crate_utils.c.

Here is the call graph for this function:

◆ getnum()

unsigned long long getnum ( const char *  str,
const char *  msg 
)

Definition at line 222 of file crate_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

int init ( struct workload w)

Definition at line 81 of file crate_client_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_by_array64()

void init_by_array64 ( unsigned long long  init_key[],
unsigned long long  key_length,
unsigned long long  seed 
)

Definition at line 83 of file crate_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_genrand64()

void init_genrand64 ( unsigned long long  seed)

Definition at line 73 of file crate_utils.c.

Here is the caller graph for this function:

◆ init_rand_generator()

void init_rand_generator ( unsigned long long  seed)

Definition at line 173 of file crate_utils.c.

Here is the call graph for this function:

◆ rate()

double rate ( bcnt_t  items,
const struct timeval *  tval,
int  scale 
)

Definition at line 217 of file crate_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ release_motr_thread()

void release_motr_thread ( struct m0_workload_task task)

Definition at line 71 of file crate_client_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeval_add()

void timeval_add ( struct timeval *  sum,
struct timeval *  term 
)

Definition at line 198 of file crate_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeval_diff()

void timeval_diff ( const struct timeval *  start,
const struct timeval *  end,
struct timeval *  diff 
)

Definition at line 189 of file crate_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeval_norm()

void timeval_norm ( struct timeval *  t)

Normalize struct timeval, so that microseconds field (tv_usec) is less than one million.

Definition at line 204 of file crate.c.

◆ timeval_sub()

void timeval_sub ( struct timeval *  end,
struct timeval *  start 
)

Definition at line 205 of file crate_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsec()

double tsec ( const struct timeval *  tval)

Definition at line 212 of file crate_utils.c.

Here is the caller graph for this function:

Variable Documentation

◆ cass_conf

struct m0_idx_cass_config cass_conf = {}

Definition at line 40 of file crate_client_utils.c.

◆ conf

struct crate_conf* conf = NULL

Definition at line 38 of file crate_client_utils.c.

◆ container

struct m0_container container = {}

Definition at line 43 of file crate_client_utils.c.

◆ dix_conf

struct m0_idx_dix_config dix_conf = {}
static

Definition at line 45 of file crate_client_utils.c.

◆ m0_conf

struct m0_config m0_conf = {}

Definition at line 39 of file crate_client_utils.c.

◆ m0_instance [1/2]

Definition at line 42 of file crate_client_utils.c.

◆ m0_instance [2/2]

Definition at line 42 of file crate_client_utils.c.

◆ mt

unsigned long long mt[NN]
static

Definition at line 67 of file crate_utils.c.

◆ mti

int mti = NN+1
static

Definition at line 70 of file crate_utils.c.

◆ num_m0_workloads

int num_m0_workloads = 0
static

Definition at line 41 of file crate_client_utils.c.

◆ uber_realm

struct m0_realm uber_realm = {}
static

Definition at line 44 of file crate_client_utils.c.