Files
neon/safekeeper/benches
Vlad Lazar 502d512fe2 safekeeper: lift benchmarking utils into safekeeper crate (#10200)
## Problem

The benchmarking utilities are also useful for testing. We want to write
tests in the safekeeper crate.

## Summary of changes

This commit lifts the utils to the safekeeper crate. They are compiled
if the benchmarking features is enabled or if in test mode.
2024-12-19 14:04:42 +00:00
..

Safekeeper Benchmarks

To run benchmarks:

# All benchmarks.
cargo bench --package safekeeper

# Specific file.
cargo bench --package safekeeper --bench receive_wal

# Specific benchmark.
cargo bench --package safekeeper --bench receive_wal process_msg/fsync=false

# List available benchmarks.
cargo bench --package safekeeper --benches -- --list

# Generate flamegraph profiles using pprof-rs, profiling for 10 seconds.
# Output in target/criterion/*/profile/flamegraph.svg.
cargo bench --package safekeeper --bench receive_wal process_msg/fsync=false --profile-time 10

Additional charts and statistics are available in target/criterion/report/index.html.

Benchmarks are automatically compared against the previous run. To compare against other runs, see --baseline and --save-baseline.