$percentiles returns percentile cut points for a field.
A percentile tells you the value below which a percentage of observations fall.
50th percentile: median-like center point95th percentile: tail latency/price threshold99th percentile: extreme tail threshold
Compatibility
| Field Type | Supported |
|---|---|
| TEXT | No |
| U64/I64/F64 | Yes |
| DATE | Yes |
| BOOL | No |
| KEYWORD | No |
| FACET | No |
FAST.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
field | string | Yes | Field to aggregate. |
percents | number[] | No | Percent points to calculate (for example [50, 95, 99]). |
keyed | boolean | No | If true (default), returns a map. If false, returns an array of { key, value }. |
missing | number | No | Fallback value for missing fields. |
percents is omitted, defaults to [1.0, 5.0, 25.0, 50.0, 75.0, 95.0, 99.0].
- TypeScript
- Python
- Redis CLI
Output
keyed: true (default):
keyed: false: