perf(rustfs): remove the fake s3_operations benchmark (#4817)

bench(rustfs): remove the fake s3_operations benchmark

rustfs/benches/s3_operations.rs never measured S3: all three groups
(put_object/get_object/list_objects) only black_box(data.len())/black_box(count)
with a 'In a real benchmark, this would call the actual S3 client' comment. It
gave a false 'S3 operations have benchmark coverage' signal and was dead weight
on rustfs/Cargo.toml.

Delete the file and its [[bench]] entry. S3-face performance is covered solely
by the warp A/B gate (performance-ab.yml); the runbook scope note now says so
explicitly. Micro-benchmarks stay at the function level (perf-8).

Refs rustfs/backlog#1152 (perf-9).
This commit is contained in:
Zhengchao An
2026-07-15 11:10:48 +08:00
committed by GitHub
parent 57a9fc6ac8
commit 5294f36669
3 changed files with 7 additions and 86 deletions
@@ -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).
-5
View File
@@ -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"]
-81
View File
@@ -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);