AWS has released a new developer tool powered by machine learning. CodeGuru provides intelligent recommendations for improving code quality and lowering operational costs.

“Our customers develop and run a lot of applications that include millions and millions of lines of code. Ensuring the quality and efficiency of that code is incredibly important, as bugs and inefficiencies in even a few lines of code can be very costly. Today, the methods for identifying code quality issues are time-consuming, manual, and error-prone, especially at scale,” said Swami Sivasubramanian, the vice president of Amazon Machine Learning at AWS.

Typically, developers need to do extensive code reviews to see if the code is correct in the first place and organizations are finding it difficult to find enough experienced developers to handle that process. After that, they have to monitor application performance through logging that impacts performance and doesn’t measure metrics like CPU utilization, according to AWS. 

AWS built CodeGuru to tackle the problem. The solution consists of two main parts: the CodeGuru Reviewer and the Application Profiler.

The Code Reviewer uses machine learning to automatically flag issues and difficult-to-find bugs during the application development process, while providing specific recommendations on how to fix them. 

The machine learning models have been trained on several decades of code reviews at and over ten thousand open-source projects on GitHub.

Amazon CodeGuru Reviewer also provides a pull request dashboard that lists information for all code reviews such as the status of the code review, the number of lines of code analyzed, and the number of recommendations. Developers can then give thumbs up or thumbs down feedback on the recommendations to improve them over time. 

Meanwhile, CodeGuru Profiler uses machine learning to identify the most expensive lines of code by helping developers understand the runtime behavior of their applications. 

This helps to identify and remove code inefficiencies, improve performance, and significantly decrease compute costs, according to AWS. 

Once found, the information is brought together in a profile that shows the areas of code that are most inefficient and provides visualizations that identify the code methods that are creating bottlenecks, along with a time-series graph of detected anomalies. 

“Developers can now take advantage of the same technology deployed at Amazon to improve application performance and customer experiences, while also eliminating their most expensive lines of code,” AWS wrote in a blog post that contains additional details on the new solution.