1 00:00:00,000 --> 00:00:02,780 ‫Now let's talk about Amazon CodeGuru. 2 00:00:02,780 --> 00:00:05,117 ‫And this is a machine learning-powered service 3 00:00:05,117 --> 00:00:06,800 ‫that will do two things. 4 00:00:06,800 --> 00:00:09,090 ‫Number one is automated code reviews, 5 00:00:09,090 --> 00:00:11,720 ‫and number two is application performance recommendations. 6 00:00:11,720 --> 00:00:14,050 ‫So when developers push our code, 7 00:00:14,050 --> 00:00:16,331 ‫there is usually another developer that does a code review. 8 00:00:16,331 --> 00:00:18,865 ‫And then when the code is deployed into production, 9 00:00:18,865 --> 00:00:21,660 ‫you need to be able to monitor the performance of your code, 10 00:00:21,660 --> 00:00:24,180 ‫and maybe you'll detect bugs by looking at the performance. 11 00:00:24,180 --> 00:00:26,491 ‫So CodeGuru does that in an automated fashion. 12 00:00:26,491 --> 00:00:31,030 ‫So CodeGuru Reviewer is here to do automated code reviews 13 00:00:31,030 --> 00:00:32,790 ‫with static code analysis. 14 00:00:32,790 --> 00:00:36,250 ‫So that means when you deploy your code onto a repository, 15 00:00:36,250 --> 00:00:38,497 ‫for example, CodeCommit or GitHub, 16 00:00:38,497 --> 00:00:42,132 ‫then the CodeGuru can have a look at all the lines of code 17 00:00:42,132 --> 00:00:44,900 ‫and then can give you actionable recommendations 18 00:00:44,900 --> 00:00:47,480 ‫in case it detects a bug or a memory leak 19 00:00:47,480 --> 00:00:49,310 ‫or something that it has seen before. 20 00:00:49,310 --> 00:00:52,220 ‫So, because of this machine learning capability, 21 00:00:52,220 --> 00:00:55,660 ‫it can detect bugs before even other reviewers detect them, 22 00:00:55,660 --> 00:00:56,990 ‫which is very helpful. 23 00:00:56,990 --> 00:00:59,257 ‫And then CodeGuru Profiler is going to be here 24 00:00:59,257 --> 00:01:01,531 ‫to give you visibility or recommendations 25 00:01:01,531 --> 00:01:03,600 ‫about your application performance 26 00:01:03,600 --> 00:01:05,006 ‫during runtimes or in production. 27 00:01:05,006 --> 00:01:07,205 ‫So when you build and test your application, 28 00:01:07,205 --> 00:01:09,900 ‫CodeGuru Profiler is already going to detect 29 00:01:09,900 --> 00:01:13,730 ‫and optimize the expensive lines of code pre-production. 30 00:01:13,730 --> 00:01:15,570 ‫And then when you deploy your application, 31 00:01:15,570 --> 00:01:17,980 ‫you're going to measure your application in real time, 32 00:01:17,980 --> 00:01:20,210 ‫and CodeGuru Profiler, yet again, 33 00:01:20,210 --> 00:01:21,800 ‫is going to identify performance 34 00:01:21,800 --> 00:01:23,493 ‫and cost improvements in production 35 00:01:23,493 --> 00:01:26,840 ‫and give you these recommendations directly in your code. 36 00:01:26,840 --> 00:01:28,443 ‫So this is the whole power CodeGuru. 37 00:01:28,443 --> 00:01:30,187 ‫So if we do a deep dive, 38 00:01:30,187 --> 00:01:33,500 ‫CodeGuru Reviewer really looks at your commits, 39 00:01:33,500 --> 00:01:35,470 ‫so whenever you push your code, 40 00:01:35,470 --> 00:01:39,167 ‫and tells you the lines of code that are probably wrong, 41 00:01:39,167 --> 00:01:40,990 ‫so it could be very, very handy, 42 00:01:40,990 --> 00:01:42,940 ‫so you can identify critical issues, 43 00:01:42,940 --> 00:01:45,180 ‫security vulnerabilities, and hard-to-find bugs. 44 00:01:45,180 --> 00:01:48,491 ‫So, for example, you can implement coding best practices, 45 00:01:48,491 --> 00:01:51,530 ‫you can find resource leaks, do security detections 46 00:01:51,530 --> 00:01:53,910 ‫in case you're creating a security hole, 47 00:01:53,910 --> 00:01:55,768 ‫or input validation. 48 00:01:55,768 --> 00:01:58,510 ‫The way it does it is using machine learning 49 00:01:58,510 --> 00:01:59,637 ‫and automated reasoning. 50 00:01:59,637 --> 00:02:00,900 ‫And how does it do it? 51 00:02:00,900 --> 00:02:04,410 ‫Well, there are code reviews that were analyzed by CodeGuru 52 00:02:04,410 --> 00:02:07,460 ‫across thousands of open source repositories out there, 53 00:02:07,460 --> 00:02:10,730 ‫and also on all the amazon.com repositories, 54 00:02:10,730 --> 00:02:13,612 ‫so this is how it learned to be a code reviewer 55 00:02:13,612 --> 00:02:15,060 ‫through machine learning. 56 00:02:15,060 --> 00:02:16,900 ‫It supports currently Java and Python, 57 00:02:16,900 --> 00:02:18,233 ‫and it has integration with GitHub, 58 00:02:18,233 --> 00:02:19,981 ‫Bitbucket, and CodeCommit. 59 00:02:19,981 --> 00:02:21,480 ‫Now, don't quote me on this. 60 00:02:21,480 --> 00:02:22,774 ‫Maybe things will evolve over time. 61 00:02:22,774 --> 00:02:24,370 ‫If it does evolve, don't worry: 62 00:02:24,370 --> 00:02:26,046 ‫you don't need to know that level of detail. 63 00:02:26,046 --> 00:02:28,566 ‫Just know about CodeGuru, CodeGuru Reviewer, 64 00:02:28,566 --> 00:02:31,035 ‫and then, lastly, CodeGuru Profiler. 65 00:02:31,035 --> 00:02:34,254 ‫So Profiler is when your application is in production 66 00:02:34,254 --> 00:02:35,630 ‫or in pre-prod, 67 00:02:35,630 --> 00:02:37,310 ‫and it helps understand the runtime behavior 68 00:02:37,310 --> 00:02:38,470 ‫of your application, 69 00:02:38,470 --> 00:02:42,148 ‫and to look at what consumes excessive CPU capacity, 70 00:02:42,148 --> 00:02:44,650 ‫for example, on the logging routine. 71 00:02:44,650 --> 00:02:46,565 ‫So it will allow you to identify 72 00:02:46,565 --> 00:02:48,525 ‫and remove code inefficiencies, 73 00:02:48,525 --> 00:02:50,220 ‫improve the application performance, 74 00:02:50,220 --> 00:02:51,996 ‫for example, reduce the CPU utilization, 75 00:02:51,996 --> 00:02:54,930 ‫decrease compute costs, provide heap summaries 76 00:02:54,930 --> 00:02:56,413 ‫so to identify which objects 77 00:02:56,413 --> 00:02:58,830 ‫are taking a lot of space in memory, 78 00:02:58,830 --> 00:03:00,630 ‫anomaly detection, as well, 79 00:03:00,630 --> 00:03:02,721 ‫in case your application behaves weirdly. 80 00:03:02,721 --> 00:03:04,460 ‫It also supports applications 81 00:03:04,460 --> 00:03:07,975 ‫that will be running on AWS Cloud or even on-premises. 82 00:03:07,975 --> 00:03:09,120 ‫And there's going to be 83 00:03:09,120 --> 00:03:10,720 ‫a minimal overhead on the application 84 00:03:10,720 --> 00:03:13,150 ‫to be monitored using CodeGuru Profiler. 85 00:03:13,150 --> 00:03:14,880 ‫So that's it for this lecture. 86 00:03:14,880 --> 00:03:16,932 ‫Just, again, remember the high level of CodeGuru, 87 00:03:16,932 --> 00:03:19,220 ‫CodeGuru Reviewer, and Profiler, 88 00:03:19,220 --> 00:03:20,221 ‫and you should be good to go. 89 00:03:20,221 --> 00:03:22,263 ‫And I will see you in the next lecture.