arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.12806cs.SEcs.AI
收藏

通过大语言模型智能体代码分析识别软件系统中性能敏感的配置项

Identifying Performance-Sensitive Configurations in Software Systems through Code Analysis with LLM Agents

Concordia University(康考迪亚大学)

Zehao Wang, Dong Jae Kim, Tse-Hsun Chen

AI总结:

本研究提出轻量级框架PerfSense,借助带提示链、RAG技术的LLM智能体识别软件性能敏感配置,在7个Java系统上准确率达64.77%,优于基线与现有最优方法,可减少人工工作量。

摘要:

配置设置对于定制软件行为以满足特定性能需求至关重要。然而,错误配置十分普遍,且由于可能的设置数量庞大、复杂度高,识别那些会影响系统性能的配置项颇具挑战。本文提出PerfSense——一种轻量级框架,它利用大语言模型(Large Language Models, LLMs)以极低开销高效识别性能敏感配置。PerfSense采用LLM智能体,借助提示链、检索增强生成(retrieval-augmented generation, RAG)等高级提示技术,模拟开发者与性能工程师之间的交互。我们对7个开源Java系统的评估表明,PerfSense在性能敏感配置分类上的平均准确率达64.77%,优于我们的LLM基线(50.36%)和此前的最优方法(61.75%)。值得注意的是,我们的提示链技术在保持相近精确率的同时,将召回率提升了10%至30%。此外,对362个误分类样本的人工分析揭示了常见问题,包括LLM对需求的误解(占比26.8%)。综上,PerfSense大幅减少了性能敏感配置分类中的人工工作量,也为未来基于LLM的代码分析研究提供了有价值的见解。

英文摘要:

Configuration settings are essential for tailoring software behavior to meet specific performance requirements. However, incorrect configurations are widespread, and identifying those that impact system performance is challenging due to the vast number and complexity of possible settings. In this work, we present PerfSense, a lightweight framework that leverages Large Language Models (LLMs) to efficiently identify performance-sensitive configurations with minimal overhead. PerfSense employs LLM agents to simulate interactions between developers and performance engineers using advanced prompting techniques such as prompt chaining and retrieval-augmented generation (RAG). Our evaluation of seven open-source Java systems demonstrates that PerfSense achieves an average accuracy of 64.77% in classifying performance-sensitive configurations, outperforming both our LLM baseline (50.36%) and the previous state-of-the-art method (61.75%). Notably, our prompt chaining technique improves recall by 10% to 30% while maintaining similar precision levels. Additionally, a manual analysis of 362 misclassifications reveals common issues, including LLMs' misunderstandings of requirements (26.8%). In summary, PerfSense significantly reduces manual effort in classifying performance-sensitive configurations and offers valuable insights for future LLM-based code analysis research.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑