pub fn cmdline()Expand description
The default command line interface.
This function is public and can be called in a different crate. For example, one can integrate their own key-value stores by registering the constructor function. Then, adding this function will produce a benchmark binary the has the same usage as the one in this crate.
§Usage
To get the usage of the command line interface, users can run:
kvbench -hThe interface supports three modes, bench, server and list.
§Benchmark Mode
Usage:
kvbench bench -s <STORE_CONFIG> -b <BENCH_CONFIG>Where STORE_CONFIG and BENCH_CONFIG are the paths to the key-value store and benchmark
configuration files, respectively.
§Server mode
Usage:
kvbench server -s <STORE_CONFIG> -a <HOST> -p <PORT> -n <WORKERS>Where STORE_CONFIG is the path of the key-value store configuration file.
The default HOST and PORT are 0.0.0.0 and 9000. By default, the server will spawn one
worker thread only for incoming connections. You can adjust the number of worker threads by
specifying -n.
§List mode
Usage:
kvbench listThis command lists all registered key-value stores’ names.