arXiv:2610.29695cs.SEOct 2026

Manuscript Offprint

arXiv:2610.29695

Benchmarking Coding Agents for System-Level Performance Optimization

Yanze Zhang, Maggie Yongqi Guan, Shudong Liu, Qi Hao, Kanye Ye Wang, Meng Qu, Xiaobo Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Coding agents are becoming an increasingly important paradigm for automating software engineering tasks. However, existing coding benchmarks primarily evaluate agents at the function or repository level, leaving their capabilities in more complex distributed software systems largely unexplored. In practice, many modern applications adopt microservice architectures, where end-to-end performance emerges from interactions among multiple independently running services, requiring agents to reason beyond local code changes. To study this capability, we introduce MicroPerf-Bench, a benchmark for evaluating coding agents on end-to-end performance optimization in microservice systems. Constructing such a benchmark is challenging because reproducible system-level performance fixes are sparse and difficult to attribute. We address this challenge by injecting empirically grounded performance anti-patterns into real-world open-source systems while preserving functionality and ensuring measurable performance degradation. The resulting benchmark contains 65 optimization instances across seven systems and nine anti-patterns, each with an executable environment, functional tests, and mixed-workload evaluation. Across 1,755 runs covering nine agent-model configurations, the best configuration recovers only 42.0% of the injected performance degradation. The dominant failure is not invalid code, but functionally correct and constraint-compliant changes that fail to improve end-to-end performance, highlighting system-level bottleneck localization as a key challenge for current coding agents. The source code and data are available at https://github.com/zyzcjnb/microperf.

1 INTRODUCTION

Large language models have rapidly evolved from code-generation tools into coding agents that can solve software engineering tasks (Jimenez et al., 2024; Yang et al., 2024). As these agents become increasingly capable, reliably evaluating their capabilities becomes increasingly important. Existing coding-agent benchmarks have largely focused on functional software engineering tasks. For example, SWE-bench (Jimenez et al., 2024) evaluates whether agents can resolve software issues by producing patches that satisfy functional tests. Such benchmarks are crucial for measuring progress in coding agents, but functional correctness captures only one dimension of software quality.

Recently, there has been growing interest in a complementary capability: performance optimization, which asks whether an agent can make software more efficient in terms of execution time and resource usage while preserving its functionality. Such software performance depends on the workload, execution environment, and runtime interactions. Therefore, an effective optimization agent should identify the source of performance degradation, determine an appropriate modification, and verify that the modification produces a measurable improvement under execution.

Motivated by this challenge, recent work has begun to benchmark the performance-optimization capabilities of coding agents. Early benchmarks mainly study performance at the function or program level. For example, EffiBench (Huang et al., 2024) evaluates the efficiency of generated imple-mentations on self-contained programming tasks. More recent benchmarks, such as GSO (Shetty et al., 2026), extend evaluation to the repository level, requiring agents to navigate larger codebases and produce correctness-preserving optimizations. However, these settings still largely treat a program or codebase together with its workload as the unit of optimization. An important capability remains less explored: system-level performance optimization, where end-to-end behavior emerges from interactions among multiple components during execution.

Microservice systems provide a representative setting for studying this capability. A microservice application is composed of multiple independently running services that communicate through network calls. As a result, the latency experienced by a user may depend on an entire execution path across services. Performance optimization in this setting thus requires agents to reason beyond local code changes and understand how components interact at runtime. However, building a benchmark in the microservice setting is nontrivial. Reproducible real-world system-level performance fixes are sparse, often intertwined with other code changes and difficult to attribute. At the same time, arbitrarily synthesized performance bugs may fail to reflect the problems that arise in real systems.

To address these challenges, we introduce MicroPerf-Bench, a benchmark for evaluating coding agents on end-to-end performance optimization in microservice systems. Rather than relying solely on mined fixes, we construct benchmark instances through controlled injection of empirically grounded microservice performance anti-patterns (Keck et al., 2016), which capture recurring system-level inefficiencies. We inject them into real-world microservice systems while preserving functional behavior and ensuring measurable performance degradation. The resulting benchmark contains 65 optimization instances across seven microservice systems and nine performance anti-patterns. Each instance provides an executable multi-service environment, functional tests, and mixed-workload performance evaluation. Given an under-optimized system, an agent must inspect and modify its implementation. The affected services are then rebuilt and redeployed, and the resulting system is evaluated for both functional correctness and end-to-end performance improvement.

Using MicroPerf-Bench, we conduct a systematic evaluation of nine agent-model configurations formed by three agent harnesses and three underlying models. We run every configuration three times on all 65 instances, yielding 1,755 optimization runs. Current coding agents remain far from solving the benchmark: even the best configuration achieves an average normalized score of only 42.0 out of 100. More importantly, our failure analysis reveals that the dominant failure is not invalid code. Instead, agents frequently produce functionally correct modifications that yield no measurable end-to-end performance gain. This finding exposes an important gap between agents' ability to modify code and their ability to understand and optimize system-level runtime behavior: identifying the true bottleneck remains a central challenge. Our broader analysis further shows that performance varies substantially across host systems and repeated runs, motivating both system-aware optimization methods and more robust evaluation protocols.