#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <errno.h>
#include <stdarg.h>
#include "motr/m0crate/parser.h"
#include "motr/m0crate/crate_client.h"
Go to the source code of this file.
|
enum | cr_kvs_key_len_max { MAX_KEY_LEN = 128
} |
|
enum | config_key_val {
INVALID_OPT = -1,
LOCAL_ADDR,
HA_ADDR,
PROF,
LAYOUT_ID,
IS_OOSTORE,
IS_READ_VERIFY,
MAX_QUEUE_LEN,
MAX_RPC_MSG,
PROCESS_FID,
IDX_SERVICE_ID,
CASS_EP,
CASS_KEYSPACE,
CASS_COL_FAMILY,
ADDB_INIT,
ADDB_SIZE,
LOG_LEVEL,
WORKLOAD_TYPE,
POOL_FID,
SEED,
NR_THREADS,
NUM_OPS,
NR_OBJS,
NUM_IDX,
NUM_KVP,
PUT,
GET,
NEXT,
DEL,
NXRECORDS,
OP_COUNT,
EXEC_TIME,
WARMUP_PUT_CNT,
WARMUP_DEL_RATIO,
KEY_PREFIX,
KEY_ORDER,
KEY_SIZE,
VALUE_SIZE,
MAX_KEY_SIZE,
MAX_VALUE_SIZE,
INDEX_FID,
THREAD_OPS,
BLOCK_SIZE,
BLOCKS_PER_OP,
IOSIZE,
SOURCE_FILE,
RAND_IO,
OPCODE,
START_OBJ_ID,
MODE,
MAX_NR_OPS,
NR_ROUNDS
} |
|
|
enum config_key_val | get_index_from_key (char *key) |
|
const char * | get_key_from_index (const enum config_key_val key) |
|
void | parser_emit_error (const char *fmt,...) __attribute__((no_exit)) __attribute__((format(printf |
|
static int | parse_int_with_units (const char *value, enum config_key_val tag) |
|
static int | parse_int (const char *value, enum config_key_val tag) |
|
int | copy_value (struct workload *load, int max_workload, int *index, char *key, char *value) |
|
int | parse_yaml_file (struct workload *load, int max_workload, int *index, char *config_file) |
|
◆ NKEYS
◆ SIZEOF_CWIDX
◆ SIZEOF_CWIO
◆ workload_index
#define workload_index |
( |
|
t | ) |
(t->u.cw_index) |
◆ workload_io
#define workload_io |
( |
|
t | ) |
(t->u.cw_io) |
◆ config_key_val
Enumerator |
---|
INVALID_OPT | |
LOCAL_ADDR | |
HA_ADDR | |
PROF | |
LAYOUT_ID | |
IS_OOSTORE | |
IS_READ_VERIFY | |
MAX_QUEUE_LEN | |
MAX_RPC_MSG | |
PROCESS_FID | |
IDX_SERVICE_ID | |
CASS_EP | |
CASS_KEYSPACE | |
CASS_COL_FAMILY | |
ADDB_INIT | |
ADDB_SIZE | |
LOG_LEVEL | |
WORKLOAD_TYPE | |
POOL_FID | |
SEED | |
NR_THREADS | |
NUM_OPS | |
NR_OBJS | |
NUM_IDX | |
NUM_KVP | |
PUT | |
GET | |
NEXT | |
DEL | |
NXRECORDS | |
OP_COUNT | |
EXEC_TIME | |
WARMUP_PUT_CNT | |
WARMUP_DEL_RATIO | |
KEY_PREFIX | |
KEY_ORDER | |
KEY_SIZE | |
VALUE_SIZE | |
MAX_KEY_SIZE | |
MAX_VALUE_SIZE | |
INDEX_FID | |
THREAD_OPS | |
BLOCK_SIZE | |
BLOCKS_PER_OP | |
IOSIZE | |
SOURCE_FILE | |
RAND_IO | |
OPCODE | |
START_OBJ_ID | |
MODE | |
MAX_NR_OPS | |
NR_ROUNDS | |
Definition at line 40 of file parser.c.
◆ cr_kvs_key_len_max
◆ copy_value()
int copy_value |
( |
struct workload * |
load, |
|
|
int |
max_workload, |
|
|
int * |
index, |
|
|
char * |
key, |
|
|
char * |
value |
|
) |
| |
◆ get_index_from_key()
◆ get_key_from_index()
◆ parse_int()
◆ parse_int_with_units()
static int parse_int_with_units |
( |
const char * |
value, |
|
|
enum config_key_val |
tag |
|
) |
| |
|
static |
◆ parser_emit_error()
void void parser_emit_error |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ conf_section_name
const char conf_section_name[] = "MOTR_CONFIG" |
◆ index_ops
◆ lookuptable