Quality assurance · Production

PerfInsights: GenAI-powered detection of Go performance antipatterns at Uber

The problem

Optimizing Go services at Uber required deep expertise and significant manual effort, with profiling and analysis taking days to weeks; in March 2024, the top 10 Go services alone accounted for more than multi-million dollars in compute spend, making performance tuning prohibitively expensive and non-trivial for most teams.

First attempt

Initial single-shot LLM-based antipattern detection produced inconsistent and unreliable results—responses varied between runs, included hallucinations, and often generated non-runnable code—with false positives exceeding 80%.

Workflow diagram · grounded in source
1
Fleet-wide production profiling
trigger
“PerfInsights leverages CPU and memory profiles from production services using Uber's daily fleet-wide profiler during peak traffic periods”
2
Hotpath function filtering
validation
“For each service, it identifies the top 30 most expensive functions based on flat CPU usage. This is based on the observation that the top 30 most expensive functions account for the majority of CPU usage. Additionally, if runtime.malloc…”
3
Static noise exclusion
validation
“PerfInsights applies a static filter that excludes open-source dependencies and internal runtime functions. This step trims noise from the candidate set, ensuring downstream analysis focuses only on service-owned code that's most likely …”
4
LLM antipattern detection
ai_action
“PerfInsights passes their full source codes and a list of antipatterns to a large language model (LLM) for analysis. By combining profiling context with pattern awareness, the model can pinpoint inefficient constructs with high precision…”
5
LLM jury validation
validation
“PerfInsights leverages a jury of large language models to validate each detected antipattern. These models independently assess whether an antipattern is present and whether the suggested optimization is valid. This ensemble approach mit…”
6
LLMCheck rule-based validation
validation
“PerfInsights employs a second layer of verification via LLMCheck by running through several domain-specific rule-based validators to evaluate LLM responses”
7
Confidence-scored output
output
“The final output includes a confidence score of the function's optimisability and suggested improvements. These insights are fed into downstream tools for code transformation or manual review by developers”
8
Integration with Optix
integration
“validated suggestions flowing directly into Optix, Uber's continuous code optimization tool. This has already produced hundreds of merged diffs, measurably improving performance and generating meaningful cost savings”
9
Accuracy tracking feedback loop
feedback_loop
“LLMCheck also logs metrics on detection accuracy, tracking failure rates and signaling potential model drift”
Reported outcome

PerfInsights reduced performance analysis from days to hours, cut engineering time per issue from 14.5 hours to almost 1 hour (93.10% savings), reduced false positives from over 80% to the low teens, and produced hundreds of merged diffs driving compute cost reductions across Uber's Go services.

Reported metrics
compute spend (top 10 Go services, March 2024)more than multi-million dollars
Analysis time reductiontasks that once required days now take hours
False positive rate (after validation pipeline)over 80% to the low teens
Diffs generated and mergedhundreds
Show all 21 reported metrics
compute spend (top 10 Go services, March 2024)more than multi-million dollars
analysis time reductiontasks that once required days now take hours
false positive rate (after validation pipeline)over 80% to the low teens
diffs generated and mergedhundreds
average validated detections per day (February)265
single-day detection high (February)500
validated detections by June176
antipattern count reduction over 4 months33.5%
sustained antipattern reduction count over 4 months89 antipatterns
manual effort for 5 critical antipatterns∼320 hours (two engineers, one month)
manual effort for 11 unique antipatterns∼160 hours (four-person team, one week)
dedicated expert optimization effort∼960 hours (six months full-time)
total historical manual effort (sample cases)over 1,400 hours
projected annual antipattern reduction267 antipatterns
manual hours equivalent for projected annual volumeapproximately 3,800 hours
engineering time per issue (before vs after)from 14.5 hours to almost 1 hour of tool runtime
engineering time savings93.10%
hallucination rate reductionmore than 80%
false positive reduction (prompt engineering)80%
first high-value diff savings5 digits saving
compute cost reductionsscalable compute cost reductions
Reported stack
PerfInsightsLLMLLMCheckOptix
Source
https://www.uber.com/en-NL/blog/perfinsights/
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

PerfInsights reduced performance analysis from days to hours, cut engineering time per issue from 14.5 hours to almost 1 hour (93.10% savings), reduced false positives from over 80% to the low teens, and produced hund…

What tools did this team use?

PerfInsights, LLM, LLMCheck, Optix.

What results were reported?

compute spend (top 10 Go services, March 2024): more than multi-million dollars; Analysis time reduction: tasks that once required days now take hours; False positive rate (after validation pipeline): over 80% to the low teens; Diffs generated and merged: hundreds (source-reported, not independently verified).

What failed first in this deployment?

Initial single-shot LLM-based antipattern detection produced inconsistent and unreliable results—responses varied between runs, included hallucinations, and often generated non-runnable code—with false positives excee…

How is this quality assurance AI workflow structured?

Fleet-wide production profiling → Hotpath function filtering → Static noise exclusion → LLM antipattern detection → LLM jury validation → LLMCheck rule-based validation → Confidence-scored output → Integration with Optix → Accuracy tracking feedback loop.