cd tutorials/leveldb-bench/
mkdir deps
cd deps/
git clone --recurse-submodules https://github.com/google/leveldb.git
cd leveldb/
git checkout ac691084fdc5546421a55b25e7653d450e5a25fb
git apply ../../patch.diff # apply patch for benchstats, fairness, mutex init & fixed duration support
git apply ../../patch02.diff # apply patch for upstreaming
cd third_party/googletest
git checkout v1.17.0
cd ../..
git add -u
git submodule update --init --recursive
cd ../../../..cd tutorials/leveldb-bench/
./configure.sh
cd ../..cd tutorials/leveldb-bench/
. ./venv/bin/activate
./campaign_leveldb.pyThere is also a campaign that uses the platform stabilization
features of benchkit (the helpers/linux/predictable folder).
To run it, run the following:
./campaign_leveldb_stable.pyAnother possible use case is perf that can be used as a command wrapper to
collect performance monitoring information into the CSV file or the data
directory.
Here follow a campaign to showcase it (see the source code for more
information):
./campaign_leveldb_perf.pyFinally, perf can also be used to generate a flamegraph, useful to debug
the performance of specific records.
The flamegraph repository must be cloned first, then the following campaign
generates a flamegraph for each record (each "dot" in the generated graphs):
cd tutorials/leveldb-bench/deps/
git clone https://github.com/brendangregg/FlameGraph.git
cd FlameGraph/
git checkout cd9ee4c4449775a2f867acf31c84b7fe4b132ad5
cd ../..
./campaign_leveldb_flame.pyYou can also try different VSync locks in LevelDB using tilt. The steps:
cd examples/tilt/
mkdir -p deps/
cd deps/
git clone https://github.com/open-s4c/tilt.git
git clone https://github.com/open-s4c/libvsync.git
cd ../../../tutorials/leveldb-bench/
. ./venv/bin/activate
./campaign_leveldb_locks.py