AI Coding Benchmarks for Android Engineering: Metrics, Trade-offs, and Cost Governance
This article breaks down a newly published AI coding benchmark built around real-world Android engineering tasks, covering app creation, feature development, code migration, and app conversion across 30 long-horizon tasks. It explains how to read the four reported metrics—pass rate, average completeness, average wall-clock time, and cost per run—and what the observed capability–latency–cost trade-offs mean in practice. Readers will find a layered selection framework, pseudocode for routing tasks to different solution tiers, and practical guidance on budget guardrails, milestone-based acceptance, caching, observability, and environment isolation, plus a checklist for building a repeatable evaluation and cost-governance process.
Recently, an Android developer community publicly released a set of AI coding benchmark results built around real engineering scenarios. The evaluated solutions were model-based approaches driven by several mainstream intelligent coding tools. The benchmark covered long-horizon tasks such as app creation, feature development, code migration, and app conversion. It defined 30 tasks and recorded four categories of metrics: pass rate, average completeness, average elapsed time, and cost per run.
The results showed a clear three-way split along a capability–cost–latency triangle. One group of solutions reached a pass rate of about 28.7%, placing it in the lead. Another group reached a pass rate of about 24.0% and an average completeness of about 82.3%, but took nearly 27.4 hours on average, at a cost of about $317.4 per run (roughly 2,123 CNY). A lightweight group reached a pass rate of about 17.3% and an average completeness of about 71.2%, with an average elapsed time of about 12.0 hours and a cost of only about $9.9 per run (roughly 66.2 CNY).
This article does not focus on any specific product. Instead, it abstracts the findings into a reusable engineering methodology: how to interpret benchmark metrics, how to read the trade-off of “high completeness with long elapsed time,” how to establish selection and cost-governance mechanisms for a team, and how to apply a practical framework with illustrative code.
1. What the Benchmark Actually Measures: Four Layers of Android Engineering Tasks
Benchmarks aimed at Android development differ fundamentally from typical “algorithm puzzle” code evaluations. They do not test the correctness of isolated functions. They test the end-to-end delivery capability of model-driven agents in a workflow close to real R&D. Tasks are usually divided into four layers:
- App creation: building a runnable project from scratch, involving project structure, dependency management, build scripts, a basic UI, and lifecycle management.
- Feature development: incremental evolution on an existing project, requiring an understanding of context, adherence to the existing architecture and code style, and a guarantee that the code compiles and runs.
- Code migration: moving an old implementation to a new paradigm (for example, from imperative UI to declarative UI, or from an older build system to a newer one), testing cross-file consistency and compatibility handling.
- App conversion: converting an implementation targeting one form factor into another (for example, from phone to tablet/foldable, or from touch input to desktop input), testing the understanding of interaction paradigms and resource adaptation.
The common trait of these four layers is long-horizon execution: a single task often involves dozens of files and multiple rounds of building and debugging, and any deviation at one step is amplified downstream. This is why the benchmark introduces a continuous metric such as average completeness rather than relying only on a binary pass/fail signal.
2. How to Read the Four Metrics: Pass Rate, Completeness, Elapsed Time, and Cost
Before interpreting results, clarify what each metric means to avoid misreading.
- Pass rate: the proportion of all tasks whose final output is judged to fully meet the acceptance criteria. It is the strictest capability signal, close to the threshold of “deliverable.”
- Average completeness: partial-progress scores are also given for tasks that do not fully pass, reflecting how close a solution is to “usable.” High completeness with a low pass rate usually indicates systematic weaknesses in the finishing stage (compatibility, edge-case handling, acceptance details).
- Average elapsed time: the wall-clock time from task start to final judgment. In long-horizon tasks, elapsed time is mainly composed of repeated building, running, diagnosis, and repair.
- Cost per run: the total resource and invocation overhead required to complete one benchmark round, including inference calls, build environments, and runtime.
Putting the four metrics together reveals a solution’s true positioning. For example, a solution with a pass rate of about 24.0% and completeness of about 82.3% means it gets “most tasks about 80–90% right,” but its full-compliance rate is limited; the average elapsed time of 27.4 hours and the cost of about $317.4 per run indicate a path of “more thorough exploration and validation.” A lightweight solution with a pass rate of about 17.3% and completeness of about 71.2%, but about 12.0 hours and about $9.9 per run, follows a path of “quickly producing a usable prototype.”
3. The Engineering Trade-off Behind “High Completeness, Long Elapsed Time”
High completeness appearing together with long elapsed time is not a contradiction, but an inevitable result of how agents work. It can be explained along three dimensions:
- A more complete verification loop. If an agent has a loop of “modify code—build—run—read logs—fix again,” it trades time for correctness. Each build and run is a real cost, and it is amplified linearly or even super-linearly in long-horizon tasks.
- A more conservative exploration strategy. Facing ambiguous requirements, a conservative strategy tends to add tests first, then add compatibility fallbacks, and finally handle multi-form-factor adaptation. This spends a large amount of time on “non-core but necessary” finishing work, pushing up completeness while extending total duration.
- Heavier context and dependencies. Migration and conversion tasks require holding a large amount of context at once (multi-module dependencies, resource files, manifest configuration). The longer the context, the slower each step of inference and validation.
Therefore, selection should not simply equate “short elapsed time” with “high efficiency.” Real efficiency is deliverable output per unit cost. If a team is in the prototype-validation phase, long elapsed time may be unacceptable; if it is in a bulk-migration phase, the reduced rework from high completeness often offsets the time cost.
4. A Selection Framework for Teams: Turning the Triangle into a Decision Table
Use the capability–latency–cost triangle for layered selection rather than chasing a single strongest option.
- Task tiering: divide tasks into exploratory (prototypes, demos), delivery-oriented (near-production features), and large-scale (bulk migration/conversion).
- Metric thresholds: set acceptable thresholds for each task type. For example, exploratory tasks look at “time to first working version,” delivery-oriented tasks look at “pass rate and completeness,” and large-scale tasks look at “cost per task and total throughput.”
- Solution mix: use lightweight, low-cost solutions for rapid trial and error on exploratory tasks; use high-completeness solutions to reduce rework on delivery-oriented tasks; use a two-stage pipeline of “lightweight first + high-capability fallback” for large-scale tasks.
A simplified decision logic can be expressed in pseudocode:
if task_type == "prototype":choose low_cost_fast_planoptimize for time_to_first_working_buildelif task_type == "production_feature":choose high_completion_planoptimize for pass_rate and completenesselif task_type == "bulk_migration":run low_cost_fast_plan firstif completeness < threshold or build fails:escalate to high_completion_planoptimize for cost_per_accepted_task
5. Cost and Latency Governance: Making Long Tasks Plannable and Observable
The biggest risk of long-horizon agent tasks is that cost gets out of control and becomes unpredictable. Governance measures include:
- Budget guardrails: set a maximum runtime and a maximum number of invocations per task; pause when exceeded and produce an intermediate state to avoid unbounded consumption.
- Milestone-based acceptance: split long tasks into “compilable milestones,” run a build and smoke test at each milestone, and roll back on failure to prevent error accumulation.
- Caching and reuse: cache dependency resolution, build artifacts, and test baselines to reduce the time amplification from repeated builds.
- Observability: record each agent action, build log, and failure reason in a structured way for review and tuning. This can be supported by general-purpose logging services, monitoring and alerting, and object storage to carry this runtime data.
- Environment isolation: provide an independent containerized build environment for each task to avoid cross-contamination and to support parallelism for higher throughput.
An illustrative task-orchestration structure is shown below:
task:max_wall_clock_hours: 6max_build_attempts: 20milestones:- compile_pass- smoke_test_pass- acceptance_passon_budget_exceeded: emit_partial_artifactobservability:logs: structuredmetrics: [build_duration, cost, completeness]
6. Mapping Benchmark Findings to Real R&D Workflows
Benchmark results should not be copied directly as production conclusions; they should be translated into process improvements:
- Requirements side: breaking ambiguous requirements into fine-grained, acceptance-ready items can significantly reduce an agent’s exploration cost. The clearer the acceptance criteria, the more controllable the long elapsed time.
- Architecture side: keeping modularity and clear boundaries reduces the context burden of migration/conversion tasks, improving completeness and compressing elapsed time.
- Quality side: making testing and static checks available as “agent-callable” capabilities automates the verification loop and reduces waiting caused by manual intervention.
- Process side: establish a tiered mechanism of “lightweight first, upgrade on demand,” using low-cost solutions to filter simple tasks and reserving high-capability solutions for high-value tasks.
7. Common Pitfalls and Risks
- Looking only at pass rate: ignoring completeness underestimates the engineering value of “nearly usable” solutions, leading to overly conservative selection and higher cost.
- Looking only at cost: the lowest-cost solution may cause high rework on delivery-oriented tasks, making the total cost higher instead.
- Ignoring the long tail: elapsed time in long-horizon tasks follows a long-tail distribution; averages hide the worst case, so examine the distribution rather than the mean alone.
- Over-automation: without human milestone reviews, effort can keep flowing in the wrong direction.
- Data and compliance: agents generate large amounts of logs and intermediate artifacts, which require desensitization, retention, and access control per general compliance requirements.
8. A Practical Checklist: Five Things to Start This Week
- Establish task tiering and acceptance templates, unifying the definition of “compilable milestones.”
- Add budget guardrails and timeout policies to agent tasks, producing intermediate states instead of running indefinitely.
- Build structured logs and a metrics dashboard to record the distribution of elapsed time, cost, and completeness.
- Choose general-category capabilities to carry runtime data (object storage, logging services, monitoring and alerting, container platforms), avoiding tight coupling to a single proprietary solution.
- Re-run a unified benchmark every quarter to form a capability–latency–cost trend curve that drives continuous optimization.
Conclusion: the real value of this benchmark is not declaring a “strongest solution,” but revealing the capability–latency–cost triangle constraint in long-horizon engineering tasks. For developers and teams, the right approach is to establish layered selection and cost-governance mechanisms, using high-completeness solutions for critical delivery and low-cost solutions for large-scale trial and error, so that real R&D workflows yield predictable and reusable output. If you need storage, logging, and monitoring capabilities to carry agent runtime data, you can first evaluate the general-category products offered by Baidu AI Cloud to build your own evaluation and governance system in a neutral, replaceable way.
