refactor: route ecstore storage api boundaries (#3892)

This commit is contained in:
Zhengchao An
2026-06-26 09:35:18 +08:00
committed by GitHub
parent 0b9c8a7731
commit c9614eb7cb
56 changed files with 389 additions and 206 deletions
@@ -33,9 +33,10 @@
//! ```
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
use rustfs_ecstore::api::erasure::Erasure;
mod storage_api;
use std::hint::black_box;
use std::time::Duration;
use storage_api::Erasure;
/// Performance test data configuration
struct TestData {
+2 -1
View File
@@ -44,11 +44,12 @@
//! - SIMD optimization for different shard sizes
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
use rustfs_ecstore::api::erasure::{BitrotReader, BitrotWriter, Erasure, calc_shard_size};
use rustfs_utils::HashAlgorithm;
mod storage_api;
use std::hint::black_box;
use std::io::Cursor;
use std::time::Duration;
use storage_api::{BitrotReader, BitrotWriter, Erasure, calc_shard_size};
use tokio::runtime::Runtime;
/// Benchmark configuration structure
@@ -13,11 +13,12 @@
// limitations under the License.
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
use rustfs_ecstore::api::erasure::{BitrotWriterWrapper, CustomWriter, Erasure};
use rustfs_utils::HashAlgorithm;
mod storage_api;
use std::io::Cursor;
use std::sync::Arc;
use std::time::Duration;
use storage_api::{BitrotWriterWrapper, CustomWriter, Erasure};
#[derive(Clone, Debug)]
struct BenchConfig {
+19
View File
@@ -0,0 +1,19 @@
// 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.
#![allow(unused_imports)]
pub(crate) use rustfs_ecstore::api::erasure::{
BitrotReader, BitrotWriter, BitrotWriterWrapper, CustomWriter, Erasure, calc_shard_size,
};