All the latest quantum computer articles

See the latest stories on quantum computing from eeNews Europe

Wednesday, December 04, 2019

CodeGuru gives automated code reviews and application performance recommendations

By Nick Flaherty www.flaherty.co.uk

Amazon has launched a cloud-based machine learning service for development teams who want to automate code reviews, identify the most expensive lines of code in their applications, and receive intelligent recommendations on how to fix or improve their code.

Even for the most seasoned engineers, it can be difficult to detect some types of code issues even through peer code reviews and unit testing. It can also be challenging to identify the most resource intensive code methods without needing performance engineering expertise. CodeGuru, based on the AWS cloud service, helps developers catch code issues faster and earlier, and improve application performance.

CodeGuru Reviewer detects and flags wide-ranging issues in source code such as thread safety issues, use of un-sanitized inputs, inappropriate handling of sensitive data, and resource leaks. It also 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 or error handling with batch operations. 

It is based on machine learning models trained on Amazon’s internal code bases of hundreds of thousands of internal projects, as well as over 10,000 open source projects in GitHub. Tens of thousands of Amazon developers have contributed to CodeGuru’s training based on decades of experience in code review and application profiling. 

For example, CodeGuru Reviewer is trained using rule mining and supervised machine learning models that use a combination of logistic regression and neural networks. During training to detect deviation from best practices, it mines Amazon code bases for pull requests that include AWS API calls. It looks at code changes and cross-references them against documentation data, which it also mines in parallel. This creates new models for best practices that Reviewer uses when it reviews the code to provide recommendations. CodeGuru Profiler is also trained by Amazon performance engineers and used to profile tens of thousands of services used internally at Amazon. 

The Profiler searches for application performance optimizations, identifying the most “expensive” lines of code and recommending ways to fix them to reduce CPU utilization, cut compute costs, and improve application performance. This provides specific recommendations so developers can take action immediately on issues such as excessive recreation of expensive objects, expensive deserialization, usage of inefficient libraries, and excessive logging. It also runs continuously in production, consuming minimal CPU capacity so it does not significantly impact application performance. 

To use the service, developers can associate existing code repositories on GitHub or AWS CodeCommit with CodeGuru. Profiling an application starts by installing a small agent using code that CodeGuru provides and configuring it in the CodeGuru console.

CodeGuru is available in preview in the AWS regions of US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), and Asia Pacific (Sydney).

Amazon CodeGuru

No comments: