immux / immux1

https://immux.com
0 stars 0 forks source link

Deprecated

This repository contains v1.0 code of Immux systems and is deprecated in favour of immux/immux.

Description

The master repository for Immux code, currently including:

ImmuxDB

Run the server

cargo build
cargo run

Test

Execute tests (both unit tests and end-to-end tests)

cargo test

Gather test coverage

1. Prepare
rustup toolchain install nightly # add nightly
cargo install grcov # install grcov
2. Gather data
sh coverage.sh
3. Check result

Look at tests/coverage-report/index.html.

Benchmarking

There are two sets of benchmarks:

  1. artificial benchmarks uses datasets generated by programs which focuses on regularity of data;
  2. realistic benchmarks uses realistic datasets and aims to reflect database performance under "real" load.
Artificial benchmarks

Currently, we totally have 3 different artificial data set. indexed_set, journal and unindex_set, you can bench specific data set by running the command:

cargo bench --bench indexed_set -- 100000 100 10 0

In the above example, parameters explanation:

  1. 100000 is row_count.
  2. 100 is num_jsons_per_command.
  3. 10 is report_period.
  4. 0 is verify_correctness.
Realistic benchmarks

Each benchmark under benches/realistic are independent and requires different datasets, which is not pre-loaded in the Git version control because they are large.

Using berka99 as an example:

1. Download data
cd benches/realistic/berka99
./init_data.sh
2. Execute benchmark
cargo bench --bench berka99

Profiling

1. Install flamegraph
cargo install flamegraph
2. Generate binary executable
cargo bench
3. Run flamegraph
# Use sudo if prompted
flamegraph target/release/realistic-SOME_HASH

Inspect the "flamegraph.svg" in a web browser (it's interactive).

The exact executable name needs to be checked manually at the moment.