Amazon CodeGuru のアイコン

Amazon CodeGuru Deprecated2019年〜

A service that uses machine learning to improve code quality and optimize application performance

What It Does

Amazon CodeGuru is a service that provides two machine learning-powered capabilities. CodeGuru Reviewer automatically reviews code in pull requests, detecting potential bugs, security vulnerabilities, and deviations from best practices. CodeGuru Profiler analyzes runtime application performance, identifying CPU-intensive code paths and memory leak sources. It supports Java and Python, and provides recommendations based on millions of code reviews conducted within Amazon.

Use Cases

CodeGuru is used throughout the development lifecycle: early bug detection through automated code reviews on pull requests, profiling and optimizing production application performance, automatic detection of security vulnerabilities (hardcoded credentials, SQL injection, etc.), standardizing code quality and upskilling development teams, and reducing infrastructure costs by identifying CPU and memory bottlenecks.

Everyday Analogy

Think of it like having a seasoned senior engineer on your team. When a junior developer submits code (a pull request), the senior engineer (CodeGuru Reviewer) reviews it and points out improvements. And when an application runs slowly, a specialist diagnostician (CodeGuru Profiler) examines the internals (code execution patterns) in detail and tells you exactly what's wrong.

What Is CodeGuru?

Amazon CodeGuru is a service that delivers Amazon's years of accumulated code review and performance optimization expertise as machine learning models. It consists of two components - CodeGuru Reviewer and CodeGuru Profiler - providing consistent support for code quality improvement from the development phase through production operations. It integrates with major repository services including GitHub, Bitbucket, and CodeCommit.

CodeGuru Reviewer Features

CodeGuru Reviewer automatically analyzes code when a pull request is created and posts improvement suggestions as comments. Detection targets include resource leaks, thread safety issues, insufficient input validation, and inefficient AWS SDK usage. The security detection feature can also identify vulnerability patterns included in the OWASP Top 10. Recommendations come with specific explanations of how to fix the issue, so developers can take action immediately. For case studies and practical tips on CodeGuru Reviewer, related books on Amazon can also be a useful reference.

CodeGuru Profiler Features

CodeGuru Profiler analyzes CPU usage and latency of applications running in production in real time. Flame graph visualizations let you see at a glance which methods consume the most CPU time. The anomaly detection feature automatically detects sudden changes in performance and sends notifications. Profiling overhead is kept to a minimum (under 5% CPU usage), making it safe to use in production environments.

Things to Watch Out For

  • CodeGuru Reviewer supports Java and Python but not other languages, so verify language support before adopting it
  • The CodeGuru Profiler agent must be embedded in your application, so plan its integration into your deployment pipeline accordingly
共有するXB!