diff --git a/docs/operations/hotpath-warp-ab-runbook.md b/docs/operations/hotpath-warp-ab-runbook.md index 7ba8ea2ec..3f31da00f 100644 --- a/docs/operations/hotpath-warp-ab-runbook.md +++ b/docs/operations/hotpath-warp-ab-runbook.md @@ -155,3 +155,10 @@ The gate logic is unit-validated across pass/warn/fail/exempt outcomes; the orchestrator and workflow are shellcheck- and `--dry-run`-validated. The first real warp measurement belongs on a Linux runner or the ansible cluster — there is no warp/multi-disk rig in the repo's local checkout. + +This warp A/B gate is the **only** entry point for S3-face (PutObject / +GetObject / ListObjects) performance coverage. There is deliberately no +in-process criterion benchmark for those operations: a criterion harness that +stands up an embedded server measures the harness, not the S3 path, so it would +report a number without guarding anything. Micro-benchmarks stay at the +function level (EC encode, `xl.meta` parse, `rename_data`; perf-8). diff --git a/rustfs/Cargo.toml b/rustfs/Cargo.toml index 81c2d7c16..dcab98fae 100644 --- a/rustfs/Cargo.toml +++ b/rustfs/Cargo.toml @@ -35,11 +35,6 @@ path = "src/lib.rs" name = "rustfs" path = "src/main.rs" -[[bench]] -name = "s3_operations" -harness = false -required-features = ["manual-test-runners"] - [features] default = ["ftps", "webdav"] metrics-gpu = ["rustfs-obs/gpu"] diff --git a/rustfs/benches/s3_operations.rs b/rustfs/benches/s3_operations.rs deleted file mode 100644 index 3268cbf27..000000000 --- a/rustfs/benches/s3_operations.rs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2024 RustFS Team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! S3 Operations Benchmarks -//! -//! These benchmarks measure the performance of core S3 operations: -//! - PutObject: Upload object to storage -//! - GetObject: Download object from storage -//! - ListObjects: List objects in a bucket -//! -//! Run with: cargo bench --bench s3_operations - -use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main}; -use std::hint::black_box; - -/// Benchmark PutObject operation (simulated) -fn bench_put_object(c: &mut Criterion) { - let mut group = c.benchmark_group("put_object"); - - for size in [1024, 1024 * 1024, 10 * 1024 * 1024] { - let data = vec![0u8; size]; - group.bench_with_input(BenchmarkId::from_parameter(size), &data, |b, data| { - b.iter(|| { - // Simulate PutObject operation - // In a real benchmark, this would call the actual S3 client - black_box(data.len()); - }); - }); - } - - group.finish(); -} - -/// Benchmark GetObject operation (simulated) -fn bench_get_object(c: &mut Criterion) { - let mut group = c.benchmark_group("get_object"); - - for size in [1024, 1024 * 1024, 10 * 1024 * 1024] { - let data = vec![0u8; size]; - group.bench_with_input(BenchmarkId::from_parameter(size), &data, |b, data| { - b.iter(|| { - // Simulate GetObject operation - // In a real benchmark, this would call the actual S3 client - black_box(data.len()); - }); - }); - } - - group.finish(); -} - -/// Benchmark ListObjects operation (simulated) -fn bench_list_objects(c: &mut Criterion) { - let mut group = c.benchmark_group("list_objects"); - - for count in [10, 100, 1000] { - group.bench_with_input(BenchmarkId::from_parameter(count), &count, |b, count| { - b.iter(|| { - // Simulate ListObjects operation - // In a real benchmark, this would call the actual S3 client - black_box(count); - }); - }); - } - - group.finish(); -} - -criterion_group!(benches, bench_put_object, bench_get_object, bench_list_objects); -criterion_main!(benches);