README.md

July 15, 2026 ยท View on GitHub

Logger Benchmarks

Performance benchmarks for various C++ logging libraries.

All repo helper scripts live under tools/.

Quick Start

Restore the pinned dependencies:

python3 tools/bootstrap_deps.py

Configure and build everything:

cmake -DCMAKE_BUILD_TYPE=Release -S . -B cmake-build-release
cmake --build cmake-build-release

Run the benchmark batch:

python3 tools/run_all.py

Generate markdown tables from the collected results:

python3 tools/generate_tables.py

If you want to save the generated tables to a file:

python3 tools/generate_tables.py > tables.md

Dependencies

Git-based third-party sources are pinned in vendor_manifest.json and managed by tools/update_vendor.py.

third_party/boost is generated by tools/setup_boost_simple.py. tools/bootstrap_deps.py is the one-shot wrapper that restores both the git-based dependencies and Boost.Log. If third_party/boost is missing during CMake configure, the build now bootstraps Boost.Log automatically so the Boost benchmarks are always added.

Download The Pinned Versions

Use this when you want the exact versions already recorded in the manifest, without advancing anything upstream:

python3 tools/bootstrap_deps.py

If you only want to resync the git-based vendored repos and leave Boost alone:

python3 tools/update_vendor.py sync --all

Update To The Latest Upstream Tips

Use this when you want to move the manifest and the vendored trees to the latest remote branch tips:

python3 tools/update_vendor.py sync --all -update

-update and --update are equivalent.

For each selected dependency, the updater:

  1. fetches the remote into .vendor-cache/
  2. resolves the latest commit from the configured update branch
  3. uses origin/master by default, unless a dependency declares "update_branch" in vendor_manifest.json
  4. falls back to the remote default branch if the selected branch does not exist
  5. replaces the vendored directory with the raw upstream snapshot
  6. writes the resolved commit back to vendor_manifest.json
  7. stages the affected manifest and vendor paths so git commit can include them directly

Dependencies with "skip_update": true in vendor_manifest.json are left on their pinned refs during --update. fmt currently stays pinned to the upstream 12.1.0 tag. spdlog currently tracks origin/v1.x during --update.

You can also update a single dependency:

python3 tools/update_vendor.py sync fmtlog -update

Useful Vendor Commands

python3 tools/update_vendor.py list
python3 tools/update_vendor.py resolve --all
python3 tools/update_vendor.py capture-patch --all
python3 tools/update_vendor.py sync fmtlog
python3 tools/update_vendor.py sync fmtlog --ref v2.3.0
python3 tools/update_vendor.py sync fmtlog -update

Treat every target_dir listed in vendor_manifest.json as vendor-owned. Local fixes should live in vendor_patches/<name>/, not as undocumented manual edits inside vendored source trees. If you intentionally change a vendored tree and want to re-record that delta, run capture-patch. The --update path does not reapply or refresh vendor_patches; it stages the raw upstream tree.

Running Benchmarks

tools/run_all.py sequentially runs the configured call_site_latency and backend_total_time benchmark executables and writes their stdout into bench_results_*.txt files in the repo root. It waits for each executable to finish before starting the next one and stops if an executable fails. It expects every benchmark binary to exist and exits with an error if any are missing.

Example:

python3 tools/run_all.py

The benchmarks use CPUs 0-5 for their caller and backend threads, so those CPUs must be available to the process. The runner gives BqLog's worker an initial CPU 5 affinity because BqLog creates that worker before the benchmark repins its caller threads.

Generating Tables

tools/generate_tables.py scans the repo root for bench_results_*.txt, parses those benchmark outputs, averages matching rows across files, and prints markdown tables.

Example:

python3 tools/generate_tables.py

To keep the tables:

python3 tools/generate_tables.py > tables.md