Quickselect & Order Statistics
In short: finding the kth smallest item does not need a full sort. Quick
sort's partition step (section 3) already tells you exactly where one item —
the pivot — belongs in sorted order. If that spot is k, you're done. If
it's past k, the answer is somewhere in the left part; if it's before k, the
answer is in the right part. Either way, only one side ever gets
partitioned again — the other is thrown away, unsorted, forever. That turns
an O(n log n) sort into an O(n) average-case selection, because the work per
round shrinks geometrically: roughly n + n/2 + n/4 + …, which sums to about
2n.

Find the median latency without sorting the log
Quarry's dashboard needs the median response time from a batch of requests, refreshed constantly. Sorting the whole log every refresh is wasted work — the median is just one or two positions, found with quickselect:
Watch quickselect hunt for the 3rd smallest of six values, discarding a side every round instead of sorting all six:
Every round partitions around one pivot and keeps only the side that can still hold the target rank. The other side is never looked at again.
Finding the 3rd smallest (target index 2). Pivot on the last value, 15. 6 cells. At index 5.