mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 00:26:53 +00:00
test(perf): reject zero-byte paired warp sizes (#5289)
* test(perf): tolerate empty paired runner node args Co-Authored-By: heihutu <heihutu@gmail.com> * test(perf): reject zero-byte paired warp sizes Keep the #1432 pinned paired ABBA default matrix on positive object sizes because warp refuses zero-byte object generation. Add a dry-run guard so zero-byte compatibility stays a separate functional probe instead of failing mid-benchmark. Co-Authored-By: heihutu <heihutu@gmail.com> --------- Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ WARP_BIN="warp"
|
|||||||
WARP_MODE="get"
|
WARP_MODE="get"
|
||||||
DURATION="60s"
|
DURATION="60s"
|
||||||
CONCURRENCIES="1,64"
|
CONCURRENCIES="1,64"
|
||||||
SIZES="0B,16383B,16384B,16385B,32767B,32768B,32769B,131071B,131072B,131073B,262143B,262144B,262145B,1048575B,1048576B,1048577B,4194304B"
|
SIZES="1B,16383B,16384B,16385B,32767B,32768B,32769B,131071B,131072B,131073B,262143B,262144B,262145B,1048575B,1048576B,1048577B,4194304B"
|
||||||
ROUNDS_PER_LEG=5
|
ROUNDS_PER_LEG=5
|
||||||
COOLDOWN_SECS=20
|
COOLDOWN_SECS=20
|
||||||
BUCKET_PREFIX="rustfs-1432-paired"
|
BUCKET_PREFIX="rustfs-1432-paired"
|
||||||
@@ -50,7 +50,7 @@ Options:
|
|||||||
--warp-mode <get|put|mixed> Default: get
|
--warp-mode <get|put|mixed> Default: get
|
||||||
--duration <dur> Default: 60s
|
--duration <dur> Default: 60s
|
||||||
--concurrencies <csv> Default: 1,64
|
--concurrencies <csv> Default: 1,64
|
||||||
--sizes <csv> Default: #1432 boundary matrix
|
--sizes <csv> Default: #1432 positive-size boundary matrix
|
||||||
--rounds-per-leg <n> Default: 5
|
--rounds-per-leg <n> Default: 5
|
||||||
--cooldown-secs <n> Default: 20
|
--cooldown-secs <n> Default: 20
|
||||||
--bucket-prefix <prefix> Default: rustfs-1432-paired
|
--bucket-prefix <prefix> Default: rustfs-1432-paired
|
||||||
@@ -110,6 +110,19 @@ validate_ack_contract() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validate_warp_sizes_supported() {
|
||||||
|
local raw
|
||||||
|
local -a raw_sizes
|
||||||
|
IFS=',' read -r -a raw_sizes <<< "$SIZES"
|
||||||
|
for raw in "${raw_sizes[@]}"; do
|
||||||
|
case "$raw" in
|
||||||
|
0|0B|0b|0K|0KB|0KiB|0k|0kb|0kib|0M|0MB|0MiB|0m|0mb|0mib|0G|0GB|0GiB|0g|0gb|0gib)
|
||||||
|
die "--sizes contains $raw, but warp requires object size > 0; run zero-byte compatibility as a separate functional probe"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
validate_label() {
|
validate_label() {
|
||||||
local value="$1"
|
local value="$1"
|
||||||
local option="$2"
|
local option="$2"
|
||||||
@@ -185,6 +198,9 @@ validate_args() {
|
|||||||
validate_ack_contract "$MINIO_ACK_CONTRACT" "--minio-ack-contract"
|
validate_ack_contract "$MINIO_ACK_CONTRACT" "--minio-ack-contract"
|
||||||
validate_csv_nonempty "$CONCURRENCIES" "--concurrencies"
|
validate_csv_nonempty "$CONCURRENCIES" "--concurrencies"
|
||||||
validate_csv_nonempty "$SIZES" "--sizes"
|
validate_csv_nonempty "$SIZES" "--sizes"
|
||||||
|
if [[ "$TOOL" == "warp" ]]; then
|
||||||
|
validate_warp_sizes_supported
|
||||||
|
fi
|
||||||
validate_positive_int "$ROUNDS_PER_LEG" "--rounds-per-leg"
|
validate_positive_int "$ROUNDS_PER_LEG" "--rounds-per-leg"
|
||||||
validate_nonnegative_int "$COOLDOWN_SECS" "--cooldown-secs"
|
validate_nonnegative_int "$COOLDOWN_SECS" "--cooldown-secs"
|
||||||
[[ "$TOOL" == "warp" || "$TOOL" == "s3bench" ]] || die "--tool must be warp or s3bench"
|
[[ "$TOOL" == "warp" || "$TOOL" == "s3bench" ]] || die "--tool must be warp or s3bench"
|
||||||
|
|||||||
@@ -34,6 +34,47 @@ if "$RUNNER" \
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if "$RUNNER" \
|
||||||
|
--access-key minioadmin \
|
||||||
|
--secret-key minioadmin \
|
||||||
|
--rustfs-endpoint http://127.0.0.1:9000 \
|
||||||
|
--rustfs-image-ref rustfs/rustfs:bench \
|
||||||
|
--rustfs-image-digest sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \
|
||||||
|
--rustfs-revision 42fc84063 \
|
||||||
|
--rustfs-ack-contract relaxed \
|
||||||
|
--minio-endpoint http://127.0.0.1:9100 \
|
||||||
|
--minio-image-ref quay.io/minio/minio:RELEASE.2025-07-18T21-56-31Z \
|
||||||
|
--minio-image-digest sha256:1111222233334444111122223333444411112222333344441111222233334444 \
|
||||||
|
--minio-release RELEASE.2025-07-18T21-56-31Z \
|
||||||
|
--minio-ack-contract strict \
|
||||||
|
--sizes 0B \
|
||||||
|
--out-dir "$TMP_DIR/bad-zero-size" \
|
||||||
|
--dry-run >"$TMP_DIR/bad-zero-size.log" 2>&1; then
|
||||||
|
echo "expected warp zero-byte benchmark size to fail" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rg -q "warp requires object size > 0" "$TMP_DIR/bad-zero-size.log"
|
||||||
|
|
||||||
|
"$RUNNER" \
|
||||||
|
--access-key minioadmin \
|
||||||
|
--secret-key minioadmin \
|
||||||
|
--rustfs-endpoint http://127.0.0.1:9000 \
|
||||||
|
--rustfs-image-ref rustfs/rustfs:bench \
|
||||||
|
--rustfs-image-digest sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \
|
||||||
|
--rustfs-revision 42fc84063 \
|
||||||
|
--rustfs-ack-contract relaxed \
|
||||||
|
--minio-endpoint http://127.0.0.1:9100 \
|
||||||
|
--minio-image-ref quay.io/minio/minio:RELEASE.2025-07-18T21-56-31Z \
|
||||||
|
--minio-image-digest sha256:1111222233334444111122223333444411112222333344441111222233334444 \
|
||||||
|
--minio-release RELEASE.2025-07-18T21-56-31Z \
|
||||||
|
--minio-ack-contract strict \
|
||||||
|
--concurrencies 1 \
|
||||||
|
--sizes 1048576B \
|
||||||
|
--rounds-per-leg 1 \
|
||||||
|
--cooldown-secs 0 \
|
||||||
|
--out-dir "$TMP_DIR/good-no-optional-arrays" \
|
||||||
|
--dry-run >"$TMP_DIR/dry-run-no-optional-arrays.log"
|
||||||
|
|
||||||
"$RUNNER" \
|
"$RUNNER" \
|
||||||
--access-key minioadmin \
|
--access-key minioadmin \
|
||||||
--secret-key minioadmin \
|
--secret-key minioadmin \
|
||||||
|
|||||||
Reference in New Issue
Block a user