mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
4559baaeeb
- Remove reed-solomon-erasure dependency and all related code - Simplify ReedSolomonEncoder from enum to struct with SIMD-only implementation - Eliminate all conditional compilation (#[cfg(feature = ...)]) - Add instance caching with RwLock-based encoder/decoder reuse - Implement reset mechanism to avoid unnecessary allocations - Ensure thread safety with proper cache management - Update documentation and benchmark scripts for SIMD-only approach - Apply code formatting across all files Breaking Changes: - Removes support for reed-solomon-erasure feature flag - API remains compatible but implementation is now SIMD-only Performance Impact: - Improved encoding/decoding performance through SIMD optimization - Reduced memory allocations via instance caching - Enhanced thread safety and concurrency support
38 lines
1.3 KiB
Rust
38 lines
1.3 KiB
Rust
/// A descriptor for metrics related to webhook logs
|
|
use crate::metrics::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
|
|
|
|
/// Define label constants for webhook metrics
|
|
/// name label
|
|
pub const NAME_LABEL: &str = "name";
|
|
/// endpoint label
|
|
pub const ENDPOINT_LABEL: &str = "endpoint";
|
|
|
|
lazy_static::lazy_static! {
|
|
// The label used by all webhook metrics
|
|
static ref ALL_WEBHOOK_LABELS: [&'static str; 2] = [NAME_LABEL, ENDPOINT_LABEL];
|
|
|
|
pub static ref WEBHOOK_FAILED_MESSAGES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::WebhookFailedMessages,
|
|
"Number of messages that failed to send",
|
|
&ALL_WEBHOOK_LABELS[..],
|
|
subsystems::LOGGER_WEBHOOK
|
|
);
|
|
|
|
pub static ref WEBHOOK_QUEUE_LENGTH_MD: MetricDescriptor =
|
|
new_gauge_md(
|
|
MetricName::WebhookQueueLength,
|
|
"Webhook queue length",
|
|
&ALL_WEBHOOK_LABELS[..],
|
|
subsystems::LOGGER_WEBHOOK
|
|
);
|
|
|
|
pub static ref WEBHOOK_TOTAL_MESSAGES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::WebhookTotalMessages,
|
|
"Total number of messages sent to this target",
|
|
&ALL_WEBHOOK_LABELS[..],
|
|
subsystems::LOGGER_WEBHOOK
|
|
);
|
|
}
|