Simplify baseline benchmark defaults

This commit is contained in:
2026-03-09 08:18:10 +08:00
parent 2c33c45d2c
commit 8da7c98842
5 changed files with 13 additions and 21 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ root_dir="$(cd -- "${script_dir}/.." && pwd)"
db_root="$1"
result_file="${2:-${script_dir}/benchmark_results.csv}"
warmup_secs="${WARMUP_SECS:-10}"
measure_secs="${MEASURE_SECS:-20}"
warmup_secs="${WARMUP_SECS:-3}"
measure_secs="${MEASURE_SECS:-5}"
prefill_keys="${PREFILL_KEYS:-200000}"
read_path="${READ_PATH:-snapshot}"
+2 -2
View File
@@ -16,8 +16,8 @@ rocksdb_dir="${root_dir}/rocksdb"
db_root="$1"
result_file="${2:-${script_dir}/benchmark_results.csv}"
warmup_secs="${WARMUP_SECS:-10}"
measure_secs="${MEASURE_SECS:-20}"
warmup_secs="${WARMUP_SECS:-3}"
measure_secs="${MEASURE_SECS:-5}"
prefill_keys="${PREFILL_KEYS:-200000}"
read_path="${READ_PATH:-snapshot}"
+6 -15
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Shared helpers for choosing default thread points from host CPU count.
# Shared helpers for choosing default power-of-two thread points from host CPU count.
detect_logical_cpus() {
local detected
@@ -28,21 +28,12 @@ is_power_of_two() {
default_thread_points() {
local cpu_count="${1:-$(detect_logical_cpus)}"
local points=()
local t
local t=1
if is_power_of_two "${cpu_count}"; then
t=1
while [ "${t}" -le "${cpu_count}" ]; do
points+=("${t}")
t=$((t * 2))
done
else
t=1
while [ "${t}" -le "${cpu_count}" ]; do
points+=("${t}")
t=$((t + 2))
done
fi
while [ "${t}" -le "${cpu_count}" ]; do
points+=("${t}")
t=$((t * 2))
done
printf "%s\n" "${points[*]}"
}