refactor: segment residual storage api boundaries (#3905)

This commit is contained in:
Zhengchao An
2026-06-26 15:56:38 +08:00
committed by GitHub
parent ae641a33ac
commit 6efbfff2c5
14 changed files with 106 additions and 23 deletions
@@ -36,7 +36,7 @@ use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_m
mod storage_api;
use std::hint::black_box;
use std::time::Duration;
use storage_api::Erasure;
use storage_api::comparison::Erasure;
/// Performance test data configuration
struct TestData {
+1 -1
View File
@@ -49,7 +49,7 @@ 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 storage_api::erasure::{BitrotReader, BitrotWriter, Erasure, calc_shard_size};
use tokio::runtime::Runtime;
/// Benchmark configuration structure
@@ -18,7 +18,7 @@ mod storage_api;
use std::io::Cursor;
use std::sync::Arc;
use std::time::Duration;
use storage_api::{BitrotWriterWrapper, CustomWriter, Erasure};
use storage_api::single_block_non_inline::{BitrotWriterWrapper, CustomWriter, Erasure};
#[derive(Clone, Debug)]
struct BenchConfig {
+12
View File
@@ -17,3 +17,15 @@
pub(crate) use rustfs_ecstore::api::erasure::{
BitrotReader, BitrotWriter, BitrotWriterWrapper, CustomWriter, Erasure, calc_shard_size,
};
pub(crate) mod comparison {
pub(crate) use super::Erasure;
}
pub(crate) mod erasure {
pub(crate) use super::{BitrotReader, BitrotWriter, Erasure, calc_shard_size};
}
pub(crate) mod single_block_non_inline {
pub(crate) use super::{BitrotWriterWrapper, CustomWriter, Erasure};
}