Motr
M0
|
#include <errno.h>
#include "lib/bitmap.h"
#include "lib/trace.h"
#include "lib/time.h"
#include "motr/m0crate/logger.h"
#include "motr/m0crate/crate_client.h"
#include "motr/m0crate/crate_client_utils.h"
Go to the source code of this file.
Data Structures | |
struct | cr_time_measure_ctx |
struct | cr_idx_ops_result |
struct | cr_idx_w_results |
struct | cr_ops_counter |
struct | cr_idx_w |
struct | kv_pair |
struct | cr_idx_w_ops |
struct | cr_watchdog |
Macros | |
#define | LOG_PREFIX "dix: " |
Typedefs | |
typedef int(* | cr_idx_w_find_k_t) (struct cr_idx_w *w, enum cr_opcode opcode, int *keys, size_t nr_keys) |
Enumerations | |
enum | { CR_MAX_OF_MAX_KEY_SIZE = (1 << 20), CR_MIN_KEY_SIZE = sizeof(struct m0_fid), CR_MAX_OF_MAX_VALUE_SIZE = (1 << 30), CR_MAX_NEXT_RECORDS = (1 << 30) } |
enum | cr_op_selector { CR_OP_SEL_RR, CR_OP_SEL_RND } |
Functions | |
static int | cr_rand_pos_range (int end) |
static size_t | cr_rand_pos_range_l (size_t end) |
static bool | cr_rand_bool () |
static void | cr_get_random_string (char *dest, size_t length) |
static double | cr_time_in_seconds (m0_time_t mtime) |
static void | cr_time_measure_begin (struct cr_time_measure_ctx *t) |
static double | cr_time_measure_elapsed_now (struct cr_time_measure_ctx *t) |
static void | cr_time_measure_end (struct cr_time_measure_ctx *t) |
static void | m0_bitmap_print (struct m0_bitmap *bm) |
static int | cr_watchdog_init (struct m0_workload_index *wt) |
static void | cr_watchdog_fini () |
static void | cr_watchdog_touch () |
static const char * | crate_op_to_string (enum cr_opcode op) |
static bool | cr_opcode_valid (enum cr_opcode opcode) |
static int | cr_idx_w_init (struct cr_idx_w *ciw, struct m0_workload_index *wit) |
static void | cr_idx_w_fini (struct cr_idx_w *ciw) |
static void | cr_idx_w_seq_keys_init (struct cr_idx_w *w, int keys_nr) |
static void | cr_idx_w_seq_keys_fini (struct cr_idx_w *w) |
static int | cr_idx_w_seq_keys_get_last (struct cr_idx_w *w, int nr, enum cr_opcode op) |
static bool | cr_idx_w_seq_keys_enabled (struct cr_idx_w *w) |
static void | cr_idx_w_seq_keys_save (struct cr_idx_w *w, int *keys, size_t keys_nr, enum cr_opcode op) |
static size_t | cr_idx_w_get_value_size (struct cr_idx_w *w) |
static int | cr_idx_w_get_nr_keys_per_op (struct cr_idx_w *w, enum cr_opcode op) |
static int | cr_idx_w_find_seq_k (struct cr_idx_w *w, enum cr_opcode opcode, int *keys, size_t nr_keys) |
static int | cr_idx_w_find_rnd_k (struct cr_idx_w *w, enum cr_opcode opcode, int *keys, size_t nr_keys) |
static bool | cr_idx_w_timeout_expired (struct cr_idx_w *w) |
static int | cr_idx_w_execute (struct cr_idx_w *w, enum cr_opcode opcode, bool random, size_t nr_keys, bool *missing_key) |
static int | cr_idx_w_get_nr_remained_ops (struct cr_idx_w *w) |
static enum cr_opcode | cr_idx_w_select_op (struct cr_idx_w *w) |
static int | cr_idx_w_get_nr_remained_op_types (struct cr_idx_w *w) |
static void | cr_idx_w_print_ops_table (struct cr_idx_w *w) |
static bool | cr_idx_w_rebalance_ops (struct cr_idx_w *w, enum cr_opcode op) |
static int | cr_idx_w_common (struct cr_idx_w *w) |
static int | cr_idx_w_warmup (struct cr_idx_w *w) |
static void | cr_time_capture_results (struct cr_time_measure_ctx *t, struct cr_idx_w *ciw) |
static void | cr_time_measure_report (struct cr_time_measure_ctx *t, struct cr_idx_w w) |
static void | idx_bufvec_free (struct m0_bufvec *bv) |
static void | kv_pair_fini (struct kv_pair *p) |
static struct m0_bufvec * | idx_bufvec_alloc (int nr) |
static int | fill_kv_del (struct cr_idx_w *w, struct m0_fid *k, struct kv_pair *p, size_t nr, int kpart_one_size, char *kpart_one) |
static int | fill_kv_next (struct cr_idx_w *w, struct m0_fid *k, struct kv_pair *p, size_t nr, int kpart_one_size, char *kpart_one) |
static int | fill_kv_get (struct cr_idx_w *w, struct m0_fid *k, struct kv_pair *p, size_t nr, int kpart_one_size, char *kpart_one) |
static int | fill_kv_put (struct cr_idx_w *w, struct m0_fid *k, struct kv_pair *p, size_t nr, int kpart_one_size, char *kpart_one) |
static M0_UNUSED bool | int_array_is_set (int *vals, size_t nr) |
static bool | m0_bitmap_is_fulfilled (struct m0_bitmap *bm, bool fill) |
static int | cr_execute_query (struct m0_fid *id, struct kv_pair *p, enum cr_opcode opcode) |
static enum cr_opcode | cr_idx_w_select_op_rr (struct cr_idx_w *w, int depth) |
static M0_UNUSED int | delete_index (struct m0_uint128 id) |
static int | create_index (struct m0_uint128 id) |
static void | cr_watchdog_thread (void *arg) |
static int | index_operation (struct workload *wt, struct m0_workload_task *task) |
void | run_index (struct workload *w, struct workload_task *tasks) |
void | m0_op_run_index (struct workload *w, struct workload_task *task, const struct workload_op *op) |
Variables | |
char * | cr_idx_op_labels [CRATE_OP_NR] |
struct cr_watchdog * | cr_watchdog = NULL |
struct cr_idx_w_ops | cr_idx_w_ops [CRATE_OP_NR] |
#define LOG_PREFIX "dix: " |
Logger prefix for DIX workload
Definition at line 144 of file crate_index.c.
typedef int(* cr_idx_w_find_k_t) (struct cr_idx_w *w, enum cr_opcode opcode, int *keys, size_t nr_keys) |
Definition at line 801 of file crate_index.c.
anonymous enum |
Global constants for DIX workload
Definition at line 161 of file crate_index.c.
enum cr_op_selector |
Enumerator | |
---|---|
CR_OP_SEL_RR | Operations should be selected in round-robin maner. |
CR_OP_SEL_RND | Operations should be selected randomly |
Definition at line 172 of file crate_index.c.
|
static |
Definition at line 976 of file crate_index.c.
|
static |
Get random string
Definition at line 208 of file crate_index.c.
|
static |
Definition at line 1254 of file crate_index.c.
|
static |
Definition at line 1050 of file crate_index.c.
|
static |
Definition at line 932 of file crate_index.c.
|
static |
Definition at line 890 of file crate_index.c.
|
static |
Definition at line 552 of file crate_index.c.
Definition at line 669 of file crate_index.c.
|
static |
|
static |
|
static |
Definition at line 654 of file crate_index.c.
|
static |
Definition at line 453 of file crate_index.c.
|
static |
Definition at line 1238 of file crate_index.c.
Definition at line 1190 of file crate_index.c.
Definition at line 1156 of file crate_index.c.
|
static |
|
static |
Definition at line 573 of file crate_index.c.
|
static |
|
static |
Definition at line 1043 of file crate_index.c.
|
static |
Definition at line 1297 of file crate_index.c.
|
static |
|
static |
Get random boolean value
Definition at line 202 of file crate_index.c.
|
static |
Get pseudo-random int32 in positive range [0;end)
Definition at line 181 of file crate_index.c.
|
static |
Get pseudo-random uint64 in positive range [0;end)
Definition at line 187 of file crate_index.c.
|
static |
capture final results
Definition at line 387 of file crate_index.c.
|
static |
Definition at line 270 of file crate_index.c.
|
static |
Definition at line 276 of file crate_index.c.
|
static |
Definition at line 282 of file crate_index.c.
|
static |
Definition at line 289 of file crate_index.c.
|
static |
RESULT REPORT
Definition at line 410 of file crate_index.c.
|
static |
Definition at line 1463 of file crate_index.c.
|
static |
Definition at line 1439 of file crate_index.c.
|
static |
Definition at line 1407 of file crate_index.c.
|
static |
Definition at line 1426 of file crate_index.c.
|
static |
|
static |
Definition at line 1359 of file crate_index.c.
|
static |
Definition at line 1318 of file crate_index.c.
|
static |
Definition at line 629 of file crate_index.c.
|
static |
|
static |
Definition at line 1474 of file crate_index.c.
|
static |
Check if all values in array is unique
Definition at line 875 of file crate_index.c.
|
static |
Definition at line 623 of file crate_index.c.
|
static |
Definition at line 927 of file crate_index.c.
|
static |
Definition at line 296 of file crate_index.c.
char* cr_idx_op_labels[CRATE_OP_NR] |
Definition at line 238 of file crate_index.c.
struct cr_idx_w_ops cr_idx_w_ops[CRATE_OP_NR] |
Definition at line 825 of file crate_index.c.
struct cr_watchdog* cr_watchdog = NULL |
Definition at line 311 of file crate_index.c.