Motr
M0
|
![]() |
Crate execution for index measurements consists of two parts:
Warmup is supposed to prepare index to workload. For example, if we have to measure over fragmented index, we should setup next parameters:
It is means, that crate performs next operations:
Common operations are executed randomly (see cr_op_selector). Each operaion has 'percents' of total operations count (OP_COUNT). Total number of keys in use are calculated by OP_COUNT and NUM_KVP. OP_COUNT can be "unlimited" TODO: for now, it means INT_MAX / (128 * NUM_KVP)
operations.
<7800000000000001:0>
).Operations are executed in round-robin manner or randomly. If crate can't find appropriate keys for operation then it marks operation as "pending". Selector knows about it and can unmark pending ops, if it cannot find appropriate operations.
Keys can be generated sequentially or randomly. There are two functions: cr_idx_w_find_rnd_k
and cr_idx_w_find_seq_k
. They both have the same signature, but different logic.
This function selects next keys from starting key to nr_keys
(the end of keys space). Starting key value depends on operation type: readonly operations (GET,NEXT) should store last key from previous key sequence; other operations (PUT,DEL) starts from first key. Anyway, they iterate over all available keys and fill key list.
This function selects random key, puts it in the key list and does it again until list is full or bitmap is full.
This struct describes how operation should be prepared for execution and how they change storage state.
Currently, only execution time is measured during the test. It measures with m0_time*
functions. Crate prints result to stdout when test is finished.
crate has own logging system, which based on fprintf(stderr...)
. (see crlog and see cr_log).
There are two ways to limit execution time. The first, is operations time limit, which checks after operation executed (as described in HLD). The second way uses the watchdog, which detects staled client operations.