mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 13:36:50 +00:00
chore(io-metrics): remove the zero-consumer config module (391 lines) (#6008)
crates/io-metrics/src/config.rs was a near-copy of io-core's Backpressure/Deadlock configuration with already-drifted field names (high_watermark vs io-core's high_water_mark) and had no consumer outside the crate's own example: the canonical BackpressureConfig lives in crates/io-core/src/backpressure.rs. Delete the module, its lib.rs re-exports, and the example's unified-config section, and settle the corresponding ARCHITECTURE.md ledger line that tracked this copy's removal. Ref rustfs/backlog#1833 (PR4).
This commit is contained in:
@@ -14,9 +14,7 @@
|
||||
|
||||
//! Example demonstrating metrics and configuration usage.
|
||||
|
||||
use rustfs_io_metrics::{
|
||||
AccessTracker, AdaptiveTTL, CacheConfig, CacheSettings, IoConfig, IoSchedulerSettings, record_cache_size,
|
||||
};
|
||||
use rustfs_io_metrics::{AccessTracker, AdaptiveTTL, CacheConfig, record_cache_size};
|
||||
use std::time::Duration;
|
||||
|
||||
fn main() {
|
||||
@@ -32,7 +30,6 @@ fn main() {
|
||||
access_tracker_example();
|
||||
|
||||
// 4. Unified configuration example
|
||||
unified_config_example();
|
||||
|
||||
// 5. Metrics recording example
|
||||
metrics_recording_example();
|
||||
@@ -109,26 +106,6 @@ fn access_tracker_example() {
|
||||
println!();
|
||||
}
|
||||
|
||||
fn unified_config_example() {
|
||||
println!("--- Unified Configuration ---");
|
||||
|
||||
let config = IoConfig::new()
|
||||
.with_cache(
|
||||
CacheSettings::new()
|
||||
.with_max_capacity(5000)
|
||||
.with_ttl(Duration::from_secs(600)),
|
||||
)
|
||||
.with_scheduler(IoSchedulerSettings::new().with_max_concurrent_reads(64));
|
||||
|
||||
println!(" Cache capacity: {}", config.cache.max_capacity);
|
||||
println!(" Cache TTL: {:?}", config.cache.default_ttl);
|
||||
println!(" Max concurrent reads: {}", config.scheduler.max_concurrent_reads);
|
||||
println!(" Backpressure high watermark: {}", config.backpressure.high_watermark);
|
||||
println!(" Default timeout: {:?}", config.timeout.default_timeout);
|
||||
|
||||
println!();
|
||||
}
|
||||
|
||||
fn metrics_recording_example() {
|
||||
println!("--- Metrics Recording ---");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user