mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-08 18:12:55 +00:00
* add percentiles aggregations add percentiles aggregation fix disabled agg benchmark * Update src/aggregation/metric/percentiles.rs Co-authored-by: Paul Masurel <paul@quickwit.io> * Apply suggestions from code review Co-authored-by: Paul Masurel <paul@quickwit.io> * fix import * fix import --------- Co-authored-by: Paul Masurel <paul@quickwit.io>
40 lines
1.1 KiB
Rust
40 lines
1.1 KiB
Rust
use common::ByteCount;
|
|
|
|
use super::bucket::DateHistogramParseError;
|
|
|
|
/// Error that may occur when opening a directory
|
|
#[derive(Debug, Clone, PartialEq, Eq, Error)]
|
|
pub enum AggregationError {
|
|
/// InternalError Aggregation Request
|
|
#[error("InternalError: {0:?}")]
|
|
InternalError(String),
|
|
/// Invalid Aggregation Request
|
|
#[error("InvalidRequest: {0:?}")]
|
|
InvalidRequest(String),
|
|
/// Date histogram parse error
|
|
#[error("Date histogram parse error: {0:?}")]
|
|
DateHistogramParseError(#[from] DateHistogramParseError),
|
|
/// Memory limit exceeded
|
|
#[error(
|
|
"Aborting aggregation because memory limit was exceeded. Limit: {limit:?}, Current: \
|
|
{current:?}"
|
|
)]
|
|
MemoryExceeded {
|
|
/// Memory consumption limit
|
|
limit: ByteCount,
|
|
/// Current memory consumption
|
|
current: ByteCount,
|
|
},
|
|
/// Bucket limit exceeded
|
|
#[error(
|
|
"Aborting aggregation because bucket limit was exceeded. Limit: {limit:?}, Current: \
|
|
{current:?}"
|
|
)]
|
|
BucketLimitExceeded {
|
|
/// Bucket limit
|
|
limit: u32,
|
|
/// Current num buckets
|
|
current: u32,
|
|
},
|
|
}
|