This page explains how to use the percentiles_array function in APL.
percentiles_array
aggregation function in APL to calculate multiple percentile values over a numeric expression in one pass. This function is useful when you want to understand the distribution of numeric data points, such as response times or durations, by summarizing them at several key percentiles like the 25th, 50th, and 95th.
You can use percentiles_array
to:
Splunk SPL users
perc
function. To get multiple percentiles, you repeat the function with different percentile values. In APL, percentiles_array
lets you specify multiple percentiles in a single function call and returns them as an array.ANSI SQL users
PERCENTILE_CONT
or PERCENTILE_DISC
with WITHIN GROUP
, repeated for each desired percentile. In APL, percentiles_array
simplifies this with a single function call that returns all requested percentiles as an array.Field
is the name of the field for which you want to compute percentile values.Percentile1
, Percentile2
, … are numeric percentile values between 0 and 100.percentiles_array
to understand the spread of request durations per HTTP method, highlighting performance variability.Querymethod | P25 | P50 | P95 |
---|---|---|---|
GET | 0.3981 ms | 0.7352 ms | 1.981 ms |
POST | 0.3261 ms | 0.7162 ms | 2.341 ms |
PUT | 0.3324 ms | 0.7772 ms | 1.341 ms |
DELETE | 0.2332 ms | 0.4652 ms | 1.121 ms |