Amazon has made its machine-learning-tools that automatically review and profile code, so you can find out where bottlenecks are and how it's going to cost you in the AWS cloud, generally available.
The service, which includes Amazon's CodeGuru Reviewer and CodeGuru Profiler, was teased last year at the internet giant's re:Invent conference. Now, both tools are available to AWS customers in some regions across the US, Ireland, UK, Germany, Sweden, Singapore, Australia, and Japan.
As the names suggest, the suite claims to do stuff such as check you're using APIs correctly, using Java language features as expected, not leaking resources or running into deadlocks, and not introducing common bugs. It is also said it can analyze the runtime behavior of your software for annoying performance anomalies. The most computationally expensive lines of code can be identified, and the tools can recommend edits to improve efficiency when run on AWS servers.
“Organizations often incur unnecessarily higher costs (sometimes upwards of tens of millions of dollars) for running applications that are in need of further optimizations because these applications consume more CPU and infrastructure than they should,” it said.
In a way, it's Amazon charging customers money to save them money; in another way, it's Amazon perhaps reducing or optimizing its per-customer load on its cloud servers, meaning more capacity.
Azure-hosted AI for finding code defects emitted – but does it work?READ MORE
Both tools are powered by machine-learning algorithms, we're told, specifically a "combination of logistic regression and neural networks." The models were trained using a mixture of rule mining and supervised machine learning. CodeGuru Reviewer was trained using decades of Amazon's own internal code reviews, as well as thousands of open-source projects on GitHub. "The result is the creation of a new set of rules that Reviewer recommends to you as best practices when it reviews your code," a spokesperson told El Reg.
The Seattle-based goliath said it has employed CodeGuru internally on more than 30,000 of its own applications. “The Amazon.com Consumer Payments team used Amazon CodeGuru Profiler from 2017 to 2018 to gain efficiencies for the biggest shopping day of the year – Prime Day – and realized a 325 per cent efficiency increase in CPU utilization across their applications and lowered costs by 39 per cent,” it boasted.
CodeGuru can be turned on and off for individual applications, and costs $0.75 for every 100 lines of code it inspects. Punters will only be charged for lines of code that have been changed or added – not ones the suite has seen before. So a 100,000-line code base processed in one go will set you back $750. Amazon also gave the example of a team of developers performing 200 pull requests, each 500 lines on average, plus 800 25-line tweaks, a month costing $900 during that period – 120,000 total lines of new code scanned divided by 100 and times 0.75.
Other pricing, such as for performance profiling, is here. ®