A trading application is experiencing intermittent latency. Walk through your troubleshooting steps at Balyasny Asset Management.
Implement the measurable analysis step: group trace durations by component, compute each component's nearest-rank 95th percentile, keep components whose percentile strictly exceeds the threshold, and return at most the two highest-latency components.
Use def rank_latency_components(traces, threshold_ms):. Each trace is a dictionary with string component and integer duration_ms; return a list of [component, p95_duration] pairs sorted by descending percentile, then component name.
def rank_latency_components(traces, threshold_ms):