Amazon today announced the general availability of CodeGuru, an AI-powered developer tool that provides recommendations for improving code quality. It was first revealed during the company’s Amazon Web Services (AWS) re:Invent 2019 conference in Las Vegas, and starting today, it’s available with usage-based pricing.
Software teams perform code reviews to check the logic, syntax, and style before new code is added to an existing application codebase — it’s an industry-standard practice. But it’s often challenging finding enough developers to perform reviews and monitor the apps post-deployment. Plus, there’s no guarantee those developers won’t miss problems, resulting in bugs and performance issues.
CodeGuru ostensibly solves this with a component that integrates with existing integrated development environments (IDEs) and taps AI algorithms trained on over 10,000 of the most popular open source projects to evaluate code as it’s being written. Where there’s an issue, CodeGuru proffers a human-readable comment that explains what the issue is and suggests potential remediations. The tool also finds the most inefficient and unproductive lines of code by creating a profile that takes into account things like latency and processor utilization.
It’s a two-part system. CodeGuru Reviewer — which uses a combination of rule mining and supervised machine learning models — detects deviation from best practices for using AWS APIs and SDKs, flagging common issues that can lead to production issues such as detection of missing pagination, error handling with batch operations, and the use of classes that are not thread-safe. Developers commit their code as usual to the repository of their choice (e.g. GitHub, GitHub Enterprise, Bitbucket Cloud, and AWS CodeCommit) and add Reviewer as one of the code reviewers. Reviewer then analyzes existing code bases in the repository, identifies bugs and issues, and creates a baseline for successive code reviews by opening a pull request. The service also provides a dashboard that lists information for all code reviews, which reflects feedback solicited from developers.
CodeGuru Profiler delivers specific recommendations on issues like extravagant recreation of objects, expensive deserialization, usage of inefficient libraries, and excessive logging. Users install an agent in their app that observes the app run time and profiles the app to detect code quality issues (along with details on latency and CPU usage). Profiler then uses machine learning to automatically identify code and anomalous behaviors that are most impacting latency and CPU usage. The information is brought together in a profile that shows the areas of code that are most inefficient. This profile includes recommendations on how developers can fix issues to improve performance and also estimates the cost of continuing to run inefficient code.
Amazon says that CodeGuru — which encodes AWS’ best practices — has been used internally to optimize 80,000 applications, leading to tens of millions of dollars in savings. In fact, Amazon claims that some teams were able to reduce processor utilization by 325% and lower costs by 39% in just a year.
CodeGuru is available now in US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (London), EU (Frankfurt), EU (Stockholm), Asia Pacific (Singapore), Asia Pacific (Sydney), and Asia Pacific (Tokyo) with availability expanding to additional regions in the coming months. Early adopters include Atlassian, cloud tech consultancy EagleDream Technologies, enterprise software developer DevFactory, condominium review website operator Renga, and scheduling program startup YouCanBook.me.