CodeGuru: Now Programmers Can Find Costly Code Using This ML Tool

Amazon recently announced the general availability of a developer tool powered by machine learning that provides intelligent recommendations for improving code quality known as CodeGuru. This tool works by identifying an application’s most expensive lines of code and helps in improving the quality of code.

Software development is a long and systematic process. Developers write code, review, and compile to deploy applications. After deploying, they measure the performance of the application and further use that data to improve the code. 

In the whole development process, if a developer somehow makes a mistake by writing an incorrect code, which is left unnoticed, all the hard work and effort can go in vain. This is the reason performing code reviews is essential, where the developers check the logic, syntax, and style of the code before the new code is added to existing applications code-base. 


Sign up for your weekly dose of what's up in emerging technology.

However, it is often challenging to have enough experienced developers with enough free time to carry out code reviews, given the amount of code that gets written every day. Also, most of the experienced reviewers even miss problems before they impact customer-facing applications, resulting in bugs and other performance issues. 

Besides, there are several other issues that should be mitigated in order to monitor the performance of applications and make them run efficiently. This is the reason behind developing the CodeGuru tool.

Behind CodeGuru

Amazon CodeGuru is a new service for the developers that uses machine learning to automate both code reviews during application development as well as profiling of applications in production. Trained with millions of lines of code from open-source projects and companies’ internal code, CodeGuru is designed to assist users in automatic code review. The tool was first announced in Dec 2019 at the AWS re:Invent event.

The CodeGuru tool has two main components, which are: –

  1. Code Reviewer: 

Amazon CodeGuru Reviewer is a service that utilises machine learning techniques as well as program analysis in order to detect potential defects that are hard for the developers to find and recommends fixes in the Java code.  

Using Amazon CodeGuru Reviewer, you can do the following tasks: –

  • CodeGuru Reviewer can find and flag code defects and suggest recommendations to fix those defects
  • It provides actionable recommendations with low false positives and improves its ability to analyse code over time based on user feedback
  • It provides recommendations as pull request comments
  1. Application Profiler: 

Using machine learning algorithms, CodeGuru Profiler can assist you in finding the most expensive lines of code and recommend the ways by which you can easily improve the efficiency of the code and remove CPU bottlenecks. It provides different visualisations of profiling data to help you identify what code is running on the CPU, see how much time is consumed, and suggest ways to reduce CPU utilisation.

Using CodeGuru Profiler, you can do the following tasks: –

  • Troubleshoot latency and CPU utilisation issues in your application
  • Learn where you could reduce the infrastructure costs of running your applications
  • Identify applications’ performance issues.

Benefits of CodeGuru

Discover Where Your Application Is Costing You Money: Amazon CodeGuru Profiler can be used by the developers to search potential savings for any application running in production. Besides, you can optimise the performance using Profiler for any application running on AWS Lambda, Amazon EC2, Amazon ECS, AWS Fargate, or AWS Elastic Beanstalk, and on-premise.

The CodeGuru Profiler also provides visualisations and recommendations on how to fix performance issues and the estimated cost of running inefficient code, helping developers prioritise remediation.

Find Costly Code Issues Before They Hit Production:

Amazon CodeGuru Reviewer uses machine learning, best practices and other learned lessons across millions of code reviews and thousands of applications profiled on open-source projects and internally at Amazon. 

The Reviewer analyses existing code bases in a repository to identify hard to find bugs and critical issues with high accuracy. After analysing, it provides intelligent suggestions on how to remediate them and creates a baseline for successive code reviews.

Wrapping Up

Using CodeGuru, developers can easily search bugs, get recommendations to fix as well as improve the codes. Besides, one can also identify various problems such as resource leaks, wasted CPU cycles, and potential concurrency race conditions.

With Amazon CodeGuru, it is now easy to run on every code review and application in an organisation. The tool can be enabled with a few clicks in the AWS console, and customers only need to pay for their actual use of Amazon CodeGuru. 

Click here to start using Amazon CodeGuru.

(Banner Image Source: here)

More Great AIM Stories

Ambika Choudhury
A Technical Journalist who loves writing about Machine Learning and Artificial Intelligence. A lover of music, writing and learning something out of the box.

Our Upcoming Events

Conference, in-person (Bangalore)
Machine Learning Developers Summit (MLDS) 2023
19-20th Jan, 2023

Conference, in-person (Bangalore)
Rising 2023 | Women in Tech Conference
16-17th Mar, 2023

Conference, in-person (Bangalore)
Data Engineering Summit (DES) 2023
27-28th Apr, 2023

Conference, in-person (Bangalore)
MachineCon 2023
23rd Jun, 2023

Conference, in-person (Bangalore)
Cypher 2023
20-22nd Sep, 2023

3 Ways to Join our Community

Whatsapp group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our newsletter

Get the latest updates from AIM