{"id":348256,"date":"2023-06-01T15:02:30","date_gmt":"2023-06-01T15:02:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=348256"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=348256","title":{"rendered":"<span>\u041a\u0430\u043a \u043c\u044b \u043d\u0430 20% \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Baseline Profiles<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<p>\u041d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 Google I\/O 2022 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"https:\/\/developer.android.com\/topic\/performance\/baselineprofiles\/overview\">Baseline Profiles<\/a>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e  \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/483\/60e\/a13\/48360ea13484fa29158c0f4d27fc9f26.png\" width=\"1120\" height=\"630\"><\/figure>\n<p>\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u0443 \u0441\u0435\u0431\u044f \u0432 \u0414\u0440\u0438\u043d\u043a\u0438\u0442\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0434\u043e 20% \u043f\u0440\u0438 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f!<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 production \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0443 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Profile.<\/p>\n<p>\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u044f \u0431\u0443\u0434\u0443 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0414\u0440\u0438\u043d\u043a\u0438\u0442. \u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Baseline Profile \u0438 \u043f\u0440\u0438\u0447\u0451\u043c \u0442\u0443\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b<\/h3>\n<p><a href=\"https:\/\/developer.android.com\/topic\/performance\/baselineprofiles\/overview\">Baseline Profiles<\/a> \u2014 \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0412\u0441\u0451 \u044d\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043e\u0431\u0449\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a Baseline Profiles \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u0432 Android.<\/p>\n<p>\u0421\u0443\u0442\u044c \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 .apk, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043b\u0435\u0436\u0430\u0442 .dex \u0444\u0430\u0439\u043b\u044b \u0441 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u043e\u043c. \u0421 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u043e\u043c \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c <a href=\"https:\/\/source.android.com\/docs\/core\/runtime\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0410\u043d\u0434\u0440\u043e\u0438\u0434\u0430<\/a>.<\/p>\n<p>\u0414\u043e \u0432\u0435\u0440\u0441\u0438\u0438 5.0 Android \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 Dalvik. \u041d\u0430 \u043d\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f JIT (Just-In-Time)-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440: \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u0441\u043d\u0438\u0436\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 5.0 \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ART (Android Runtime) \u2014 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0439 \u2014 \u0410\u041e\u0422-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e (ahead-of-time compilation), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 RAM \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430. \u0418 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u0438 \u0434\u0438\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u043e\u0431\u0449\u0430\u043b \u043e\u0431 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cec\/8ec\/a5d\/cec8eca5d14b88d3e0ca4b3577681ff0.png\" alt=\"\u0422\u0430\u043a\u043e\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Android \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435.\" title=\"\u0422\u0430\u043a\u043e\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Android \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435.\" width=\"600\" height=\"324\"><\/p>\n<div><figcaption>\u0422\u0430\u043a\u043e\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Android \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 Android 7.0 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u043c\u0438\u0440\u043e\u0432.<\/p>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u043a\u043e\u0434\u0430, \u0442\u043e \u043e\u043d\u0438 AOT-\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>dex2oat<\/code>, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 <code>.oat<\/code> \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0422\u043e, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>Profile<\/code><strong>.<\/strong><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 JIT \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0432 Profile \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f AOT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u2013&nbsp;\u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430\u043d\u043e\u0432\u043e. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e.<\/p>\n<p>\u0421 Android 9.0 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c <strong><em>\u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438,<\/em><\/strong> \u0442.\u0435. \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e \u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 Google Play. \u0418 \u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043d\u043e\u0432\u044b\u0435  \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438\u0437 \u0441\u0442\u043e\u0440\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e5\/48f\/045\/8e548f0454b14987b15618407abcfe5e.png\" alt=\" \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 Google I\/O 2022\" title=\" \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 Google I\/O 2022\" width=\"2784\" height=\"1358\"><\/p>\n<div><figcaption> \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 Google I\/O 2022<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0438\u043d\u0443\u0441:&nbsp;\u0435\u0441\u043b\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0435\u0449\u0451 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/932\/cf7\/887\/932cf78873fce6257bc9bcf56553d46a.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0441 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Google \u043f\u0440\u043e Baseline Profiles. \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0441 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Google \u043f\u0440\u043e Baseline Profiles. \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439\" width=\"2098\" height=\"1174\"><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0441 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Google \u043f\u0440\u043e Baseline Profiles. \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043a\u0430\u0447\u043e\u043a \u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u2014 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 Baseline Profiles.<\/p>\n<p>\u0412&nbsp;\u044d\u0442\u043e\u043c \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b Baseline Profiles: \u043c\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043a\u0430\u0436\u0443\u0442 \u0410\u043d\u0434\u0440\u043e\u0438\u0434\u0443, \u0447\u0442\u043e&nbsp;\u043d\u0430\u0434\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c AOT&nbsp;\u2014 \u0442\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0443\u0434\u0435\u0442&nbsp;\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439, \u043a\u0430\u043a&nbsp;\u043f\u043e\u0441\u043b\u0435 10\u201320&nbsp;\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Baseline Profiles.<\/p>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c Baseline Profile<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c benchmark (\u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0438\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435) \u0441 \u0442\u0438\u043f\u043e\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438\u043d\u0433\u0430 <code>macrobenchmark<\/code>.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u043c \u043c\u0430\u043a\u0440\u043e\u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a-\u0442\u0435\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 BaselineProfileGenerator \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0438\u0437 <a href=\"https:\/\/developer.android.com\/codelabs\/android-baseline-profiles-improve#4\">Google codelab<\/a>.<\/p>\n<pre><code class=\"kotlin\">@RunWith(AndroidJUnit4::class) class BaselineProfileGenerator {   @get:Rule  val baselineProfile = BaselineProfileRule()   @Test  fun generate() {    baselineProfile.collectBaselineProfile(packageName = \/* \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c packageName *\/) { \/\/ \u0422\u0443\u0442 \u043f\u0438\u0448\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u0441\u0432\u043e\u0439 \u0444\u043b\u043e\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \/\/ \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b      startActivityAndWait()    }  } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0451 \u0435\u0449\u0451 \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <code>androidx.benchmark:benchmark-macro-junit4:1.1.*<\/code>, \u0442\u043e \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u043d\u0430 <strong>\u0440\u0443\u0442\u043e\u0432\u043e\u043c<\/strong> \u0434\u0435\u0432\u0430\u0439\u0441\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0431\u0435\u0437 Google Services. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435:<\/p>\n<pre><code class=\"bash\">adb root<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438\u043d\u0433\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438<code>1.2.0-alpha06,<\/code><\/p>\n<p><code>androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha*<\/code><\/p>\n<p>\u0442\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Baseline Profile \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u2014 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f root-\u043f\u0440\u0430\u0432\u0430.<\/p>\n<p>\u0412\u0441\u0451!<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0435\u0441\u0442, \u0442\u043e \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d *.txt \u0444\u0430\u0439\u043b \u0441 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>adb pull<\/code> (\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0435\u0441\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0435\u0441\u0442\u0430) \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 <code>\/app\/scr\/main<\/code><\/p>\n<h3>\u041a\u0430\u043a \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/h3>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043c\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a app-\u043c\u043e\u0434\u0443\u043b\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0412 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u044d\u0442\u043e \u0432\u0441\u0451, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043f\u043e\u043c\u0438\u043c\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432 <code>\/app\/src\/main<\/code><\/p>\n<pre><code>implementation project(\"androidx.profileinstaller:profileinstaller\")<\/code><\/pre>\n<p>\u0421\u0430\u043c \u0442\u0435\u0441\u0442 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"kotlin\">@RunWith(AndroidJUnit4::class) class BaselineProfileBenchmark {    @get:Rule   val benchmarkRule = MacrobenchmarkRule()    @Test   fun startupNoCompilation() {     startup(None())   }    @Test   fun startupBaselineProfile() {     startup(         Partial(             baselineProfileMode = Require         )     )   }    fun startup(compilationMode: CompilationMode) {     benchmarkRule.measureRepeated(         packageName = \/* \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c packageName *\/,         metrics = listOf(StartupTimingMetric()),         iterations = 10,         compilationMode = compilationMode,         startupMode = COLD     ) {       pressHome()       startActivityAndWait()     }   } }<\/code><\/pre>\n<p>\u0421\u043c\u044b\u0441\u043b \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u043c\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>metrics<\/code> \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c <code>packageName<\/code>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0432 \u0442\u0435\u0441\u0442\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f compilationMode: \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0447\u0438\u0441\u0442\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0435\u0437 baseline-\u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a-\u0442\u0435\u0441\u0442: \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>iterations<\/code>:<\/p>\n<pre><code>BaselineProfileBenchmark_startupNoCompilation timeToInitialDisplayMs   min   925.8,   median 1,047.9,   max 1,199.5 Traces: Iteration 0 1 2 3 4 5 6 7 8 9<\/code><\/pre>\n<pre><code>BaselineProfileBenchmark_startupBaselineProfile timeToInitialDisplayMs   min   761.5,   median   871.2,   max 1,113.8 Traces: Iteration 0 1 2 3 4 5 6 7 8 9<\/code><\/pre>\n<p>\u041f\u043e \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 20%<\/p>\n<p>\u0410 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u0430\u043c\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u043b\u043e\u0443 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Baseline Profile. Google \u0441\u043e\u0432\u0435\u0442\u0443\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u0434\u0430\u0436\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Profile \u0432 \u0441\u0432\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0445 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/app\/src\/main<\/code>.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u0442\u043e\u0440. \u0421\u043f\u0443\u0441\u0442\u044f \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438<em>.<\/em><\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432, \u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ecc\/fb8\/dba\/eccfb8dbaf4b71d04372893055b2d702.png\" width=\"2098\" height=\"1174\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043d\u0430\u0448\u0443 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f Baseline Profiles \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435.<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c \u0441\u0445\u043e\u0436\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e: \u043f\u0440\u0438 \u0440\u0435\u043b\u0438\u0437\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u0431\u044b\u043b\u043e \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u043e, \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0443\u0436\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043e\u0442 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0438\u0434\u0438\u0442\u0435, <em>\u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a<\/em> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0448\u0435, \u0447\u0435\u043c <em>\u0441\u0438\u043d\u0438\u0439<\/em>. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u043f\u0435\u0440\u0432\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0431\u044b\u043b\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c6c\/6d0\/030\/c6c6d00300e77e20259823a66d202724.png\" width=\"1172\" height=\"734\"><\/figure>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0417\u0434\u0435\u0441\u044c \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0438\u0436\u0435 \u0441\u0438\u043d\u0435\u0433\u043e, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432 APK.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/497\/1ea\/501\/4971ea5018f5cf5cb848ee4d8da524b7.png\" width=\"1374\" height=\"712\"><\/figure>\n<p>\u0412\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c, \u0447\u0435\u0433\u043e \u043c\u044b \u0438 \u0434\u043e\u0431\u0438\u0432\u0430\u043b\u0438\u0441\u044c.<\/p>\n<blockquote>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u2013 \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u2013 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u043d\u0438\u0436\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430. \u041f\u043e \u0438\u0434\u0435\u0435, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0441\u0438\u043d\u0438\u0439.<\/p>\n<p>\u041c\u044b \u043f\u043e\u043a\u0430 \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<p>\u043f\u0435\u0440\u0432\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u044b\u0435 \u0438 \u043c\u043e\u0449\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 &#8212; \u0443 \u043d\u0438\u0445 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432\u0441\u0451 \u0431\u044b\u0441\u0442\u0440\u0435\u0435; \u0440\u0430\u043d\u0434\u043e\u043c, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c.  <\/p>\n<p>\u0410 \u043a\u0430\u043a\u0438\u0435 \u0443 \u0432\u0430\u0441 \u0432\u0435\u0440\u0441\u0438\u0438? \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438!<\/p>\n<\/blockquote>\n<h3>\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0434\u043b\u044f \u0414\u0440\u0438\u043d\u043a\u0438\u0442<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043f\u0440\u043e\u043a\u0430\u0447\u043a\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u0430\u0440\u0442\u043e\u0439, \u0434\u0438\u0430\u043b\u043e\u0433\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0441\u043a\u0440\u043e\u043b\u043b\u043e\u043c \u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044e \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e? \u0422\u0430\u043a \u043a\u0430\u043a Profile \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 AOT-\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u043e\u043b\u043a\u043d\u0451\u0442\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Baseline Profile \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u043b\u043e\u0443:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u043a\u0430\u0440\u0442\u0443 \u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043a\u043e\u0444\u0435\u0439\u043d\u044e \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u043d\u044e;<\/p>\n<\/li>\n<li>\n<p>\u0432 \u043c\u0435\u043d\u044e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442 \u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2a\/b82\/49b\/f2ab8249b1a3da510c6ad61e543fc126.png\" width=\"2500\" height=\"1080\"><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c, \u043a\u0430\u043a \u0437\u0430\u043a\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439.<\/p>\n<h4>\u0428\u0430\u0433 1: Runtime Permissions<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/907\/aa4\/77f\/907aa477fd67cf494d545ede9bee9249.png\" width=\"1920\" height=\"1200\"><\/figure>\n<p>\u0415\u0441\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 UI-\u0442\u0435\u0441\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043a\u043b\u0438\u043a\u0438\u0432\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438, \u043d\u043e \u0442\u0430\u043a \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0449\u0435 \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c!<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043a\u043b\u0438\u043a\u043e\u0432, \u043d\u043e \u043c\u0435\u0442\u043e\u0434, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a <code>@Rule<\/code> \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043c\u044b \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<pre><code class=\"kotlin\">@get:Rule @JvmField val permissionRule: GrantPermissionRule = GrantPermissionRule.grant(     android.Manifest.permission.ACCESS_COARSE_LOCATION,     android.Manifest.permission.ACCESS_FINE_LOCATION,     android.Manifest.permission.POST_NOTIFICATIONS, )<\/code><\/pre>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u043a\u043b\u0438\u043a\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<br \/> \u0412 \u043c\u0435\u0441\u0442\u0435, \u0433\u0434\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434. \u0412 \u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 exception \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c fallback \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0438\u0436\u0435<\/p>\n<pre><code class=\"kotlin\">@Test fun generate() {   baselineProfile.collectBaselineProfile(packageName = \"ru.drinkit.stage\") {     startActivityAndWait()      \/\/ \u0422\u0443\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439     grantPermission()  \/* \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f *\/   } }<\/code><\/pre>\n<pre><code class=\"kotlin\">private const val ALLOW_PASCAL_CASE_TEXT = \"Allow\" private const val ALLOW_UPPERCASE_TEXT = \"ALLOW\" private const val ALLOW_ONLY_WHILE_USING_THE_APP_TEXT = \"Allow only while using the app\" private const val WHILE_USING_THE_APP_TEXT = \"While using the app\"  private fun grantPermission() {   with(InstrumentationRegistry.getInstrumentation()) {     \/\/ Seeking for allow permission button     \/\/ If nothing found, has a fallback to permission dialog with only Allow option.     \/\/ android.Manifest.permission.POST_NOTIFICATIONS is an example     val allowPermissionButton =       allowPermissionExtended().takeIf { it.exists() }           ?: allowPermissionSimple().takeIf { it.exists() } ?: return      allowPermissionButton.click()  \/\/ \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 Permission \u0434\u0438\u0430\u043b\u043e\u0433\u0438     grantPermission()   } }  private fun Instrumentation.allowPermissionSimple() =     UiDevice.getInstance(this)         .findObject(UiSelector().text(ALLOW_PASCAL_CASE_TEXT))  private fun Instrumentation.allowPermissionExtended() =   UiDevice.getInstance(this)     .findObject(         UiSelector().text(           when {             VERSION.SDK_INT == Build.VERSION_CODES.M -&gt; ALLOW_PASCAL_CASE_TEXT             VERSION.SDK_INT &lt;= Build.VERSION_CODES.P -&gt; ALLOW_UPPERCASE_TEXT             VERSION.SDK_INT == Build.VERSION_CODES.Q -&gt; ALLOW_ONLY_WHILE_USING_THE_APP_TEXT             else -&gt; WHILE_USING_THE_APP_TEXT           },         ),     )<\/code><\/pre>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u043d\u0430\u0448\u043b\u0438 \u0432 <a href=\"https:\/\/alexzh.com\/ui-testing-of-android-runtime-permissions\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<h4>\u0428\u0430\u0433 2: \u0420\u0430\u0437\u043d\u044b\u0439 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445<\/h4>\n<p>\u041d\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u043a\u043e\u0444\u0435\u0439\u043d\u044f \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435, \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043a\u0430\u0440\u0442\u044b. \u0415\u0441\u043b\u0438 \u043a\u043e\u0444\u0435\u0439\u043d\u044f \u0443\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430, \u0442\u043e \u0433\u043e\u0441\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043c\u0435\u043d\u044e \u0441\u043e \u0432\u043a\u0443\u0441\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0438\u0442\u043a\u0430\u043c\u0438 \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438. \u041a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438?<\/p>\n<p>\u0412\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 UI-\u0442\u0435\u0441\u0442\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e. \u0418\u0449\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0441\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c, \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u0435\u0433\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435. \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451!<\/p>\n<pre><code class=\"kotlin\">if (device.findObject(map).waitForExists(EXIST_TIMEOUT)) {   startFlowFromMap() } else {   startFlowFromMenu() }<\/code><\/pre>\n<p>\u0410 \u0432\u043d\u0443\u0442\u0440\u0438 \u0443\u0436\u0435 \u043f\u0438\u0448\u0435\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u0430: \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043a\u043e\u0444\u0435\u0439\u043d\u044e, \u043d\u0430\u0436\u043c\u0451\u043c \u043d\u0430 \u043a\u043e\u0440\u0437\u0438\u043d\u0443, \u043f\u0440\u043e\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u044d\u043a\u0440\u0430\u043d<\/p>\n<h4>\u0428\u0430\u0433 3: \u041f\u0440\u043e\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043c \u043c\u0435\u043d\u044e<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441 \u043c\u0435\u043d\u044e, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043a\u0440\u043e\u043b\u043b \u0432\u043d\u0438\u0437-\u0432\u0432\u0435\u0440\u0445, \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043a\u0440\u043e\u043b\u043b, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0441\u043a\u0440\u043e\u043b\u043b. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <code>fling<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<pre><code class=\"kotlin\">private fun MacrobenchmarkScope.startFlowFromMenu() {     scrollMenuPageVertically()     clickSignIn() }  private fun MacrobenchmarkScope.scrollMenuPageVertically() {   val list = device.findObject(     By.res(\"${device.currentPackageName}:id\/viewProductSlotList\")   )    device.flingElementsDownUp(list) }  private fun UiDevice.flingElementsDownUp(list: UiObject2) {      list.setGestureMargin(displayWidth \/ 5)  list.fling(DOWN)    waitForIdle()    list.fling(UP) }<\/code><\/pre>\n<h4>\u0428\u0430\u0433 N: \u0412\u043f\u0435\u0440\u0451\u0434 \u043a \u043b\u0443\u0447\u0448\u0435\u043c\u0443!<\/h4>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 Baseline \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043e\u043f\u044b\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u0442\u0430\u0440\u0442\u0435!<\/p>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h3>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043d\u0430\u0448 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u0435 \u0442\u043e\u043b\u044c\u043a\u043e <code>startActivityAndWait()<\/code>, \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432 \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0438 \u0443\u0436\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"kotlin\">private const val EXIST_TIMEOUT = 500L  private const val EXPLORE_MENU_TEXT = \"Explore menu\" private const val SIGN_IN_TEXT = \"sign in\" private const val GOOGLE_MAP_DESCRIPTION = \"Google Map\" private const val ORDER_NOW_TEXT = \"Order now\" private const val ALLOW_PASCAL_CASE_TEXT = \"Allow\" private const val ALLOW_UPPERCASE_TEXT = \"ALLOW\" private const val ALLOW_ONLY_WHILE_USING_THE_APP_TEXT = \"Allow only while using the app\" private const val WHILE_USING_THE_APP_TEXT = \"While using the app\"  @RunWith(AndroidJUnit4::class) @Suppress(\"ANNOTATION_TARGETS_NON_EXISTENT_ACCESSOR\") class BaselineProfileGenerator {    @get:Rule   val baselineProfile = BaselineProfileRule()    @Test   fun generate() {     baselineProfile.collectBaselineProfile(packageName = \"ru.drinkit.stage\") {       startActivityAndWait()        \/\/ \u0422\u0443\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439       grantPermission()        val map = UiSelector().descriptionContains(GOOGLE_MAP_DESCRIPTION)       if (device.findObject(map).waitForExists(EXIST_TIMEOUT)) {         startFlowFromMap()       } else {         startFlowFromMenu()       }     }   }    private fun MacrobenchmarkScope.startFlowFromMap() {     clickMarkersUntilLeaf()   }    private fun MacrobenchmarkScope.startFlowFromMenu() {     device.waitForIdle()     scrollMenuPageVertically()     clickSignIn()   }    private fun MacrobenchmarkScope.scrollMenuPageVertically() {     val list = device.findObject(         By.res(\"${device.currentPackageName}:id\/viewProductSlotList\")     )      device.flingElementsDownUp(list)   }    private fun UiDevice.flingElementsDownUp(list: UiObject2) {     list.setGestureMargin(displayWidth \/ 5)     list.fling(DOWN)     waitForIdle()     list.fling(UP)   }    private fun MacrobenchmarkScope.clickSignIn() {     val signIn = device.findObject(UiSelector().text(SIGN_IN_TEXT))     signIn.clickAndWaitForNewWindow()   }    private fun MacrobenchmarkScope.clickMarkersUntilLeaf() {     val orderNow = device.findObject(UiSelector().text(ORDER_NOW_TEXT))     var orderNowExists = orderNow.waitForExists(EXIST_TIMEOUT)      val exploreMenu = device.findObject(UiSelector().text(EXPLORE_MENU_TEXT))     var exploreMenuExists = exploreMenu.waitForExists(EXIST_TIMEOUT)      while (!orderNowExists &amp;&amp; !exploreMenuExists) {       clickOnMarker()       orderNowExists = device           .findObject(UiSelector().text(ORDER_NOW_TEXT))           .waitForExists(EXIST_TIMEOUT)              exploreMenuExists = device           .findObject(UiSelector().text(EXPLORE_MENU_TEXT))           .waitForExists(EXIST_TIMEOUT)     }      if (orderNowExists) {       clickOnViewMenu(ORDER_NOW_TEXT)     }          if (exploreMenuExists) {       clickOnViewMenu(EXPLORE_MENU_TEXT)     }   }    private fun MacrobenchmarkScope.clickOnViewMenu(textOnButton: String) {     device.findObject(UiSelector().text(textOnButton))         .apply {           waitForExists(EXIST_TIMEOUT)           clickAndWaitForNewWindow()         }   }    private fun MacrobenchmarkScope.clickOnMarker() {     val marker = device.findObject(         UiSelector()             .descriptionContains(GOOGLE_MAP_DESCRIPTION)             .childSelector(UiSelector().instance(0)),     )     marker.waitForExists(EXIST_TIMEOUT)     marker.clickAndWaitForNewWindow()   }    private fun grantPermission() {     with(InstrumentationRegistry.getInstrumentation()) {       \/\/ Seeking for allow permission button       \/\/ If nothing found, has a fallback to permission dialog with only Allow option.       \/\/ android.Manifest.permission.POST_NOTIFICATIONS is an example       val allowPermissionButton =         allowPermissionExtended().takeIf { it.exists() }             ?: allowPermissionSimple().takeIf { it.exists() } ?: return        allowPermissionButton.click()    \/\/ \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 Permission \u0434\u0438\u0430\u043b\u043e\u0433\u0438       grantPermission()     }   }    private fun Instrumentation.allowPermissionSimple() =     UiDevice.getInstance(this)         .findObject(UiSelector().text(ALLOW_PASCAL_CASE_TEXT))    private fun Instrumentation.allowPermissionExtended() =     UiDevice.getInstance(this)         .findObject(             UiSelector().text(                 when {                   VERSION.SDK_INT == Build.VERSION_CODES.M -&gt; ALLOW_PASCAL_CASE_TEXT                   VERSION.SDK_INT &lt;= Build.VERSION_CODES.P -&gt; ALLOW_UPPERCASE_TEXT                   VERSION.SDK_INT == Build.VERSION_CODES.Q -&gt; ALLOW_ONLY_WHILE_USING_THE_APP_TEXT                   else -&gt; WHILE_USING_THE_APP_TEXT                 },             ),         ) }<\/code><\/pre>\n<h3>\u0420\u0435\u0437\u044e\u043c\u0438\u0440\u0443\u044f<\/h3>\n<p>Baseline Profiles \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0447\u0451\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f AOT-\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435.<\/p>\n<p>\u041d\u0430\u0448 \u043e\u043f\u044b\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Baseline Profile \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u0434\u043e 20%, \u0430 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e \u0436\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<p>\u0412\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u2013 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u0438\u043b\u0438\u044f\u043c\u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043b\u0443\u0447\u0448\u0435.<\/p>\n<h4>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/h4>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=yJm5On5Gp4c\">Android Developers \u2013 Making apps blazing fast with Baseline Profiles <\/a><br \/><a href=\"https:\/\/developer.android.com\/topic\/performance\/baselineprofiles\/create-baselineprofile\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Google \u043f\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Baseline Profiles<\/a><br \/><a href=\"https:\/\/developer.android.com\/codelabs\/android-baseline-profiles-improve\">\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0439 Google Codelab \u043f\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Baseline Profiles<\/a><br \/><a href=\"https:\/\/alexzh.com\/ui-testing-of-android-runtime-permissions\/\">Runtime Permissions \u2013 UI Testing<\/a><\/p>\n<p>\u0412 \u043a\u0430\u043d\u0430\u043b\u0435 <a href=\"https:\/\/t.me\/dodoMobile\">Dodo Mobile<\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0414\u043e\u0434\u043e \u041f\u0438\u0446\u0446\u044b, \u0414\u0440\u0438\u043d\u043a\u0438\u0442 \u0438 \u0414\u043e\u043d\u0435\u0440 42. \u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0445 (\u043d\u0443, \u043f\u043e\u0447\u0442\u0438).<\/p>\n<\/p>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll-container\">\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/companies\/dododev\/articles\/739064\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u0431\u0435\u0439\u0437\u043b\u0430\u0439\u043d \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             25%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             1           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:25%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             50%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0421\u043a\u043e\u0440\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:50%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             25%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span> <span class=\"tm-article-poll__answer-votes\">             1           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:25%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 4 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.           \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.      <\/div>\n<\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/companies\/dododev\/articles\/739064\/\"> https:\/\/habr.com\/ru\/companies\/dododev\/articles\/739064\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<p>\u041d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 Google I\/O 2022 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"https:\/\/developer.android.com\/topic\/performance\/baselineprofiles\/overview\">Baseline Profiles<\/a>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e  \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u0443 \u0441\u0435\u0431\u044f \u0432 \u0414\u0440\u0438\u043d\u043a\u0438\u0442\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0434\u043e 20% \u043f\u0440\u0438 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f!<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 production \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0443 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Profile.<\/p>\n<p>\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u044f \u0431\u0443\u0434\u0443 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0414\u0440\u0438\u043d\u043a\u0438\u0442. \u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Baseline Profile \u0438 \u043f\u0440\u0438\u0447\u0451\u043c \u0442\u0443\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b<\/h3>\n<p><a href=\"https:\/\/developer.android.com\/topic\/performance\/baselineprofiles\/overview\">Baseline Profiles<\/a> \u2014 \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0412\u0441\u0451 \u044d\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043e\u0431\u0449\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a Baseline Profiles \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430 \u0432 Android.<\/p>\n<p>\u0421\u0443\u0442\u044c \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 .apk, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043b\u0435\u0436\u0430\u0442 .dex \u0444\u0430\u0439\u043b\u044b \u0441 \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u043e\u043c. \u0421 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u043e\u043c \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c <a href=\"https:\/\/source.android.com\/docs\/core\/runtime\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0410\u043d\u0434\u0440\u043e\u0438\u0434\u0430<\/a>.<\/p>\n<p>\u0414\u043e \u0432\u0435\u0440\u0441\u0438\u0438 5.0 Android \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 Dalvik. \u041d\u0430 \u043d\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f JIT (Just-In-Time)-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440: \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u0441\u043d\u0438\u0436\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 5.0 \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ART (Android Runtime) \u2014 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0439 \u2014 \u0410\u041e\u0422-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e (ahead-of-time compilation), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 RAM \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430. \u0418 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u0438 \u0434\u0438\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u043e\u0431\u0449\u0430\u043b \u043e\u0431 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u0430\u043a\u043e\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 Android \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 Android 7.0 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u043c\u0438\u0440\u043e\u0432.<\/p>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 JIT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0431\u0430\u0439\u0442\u043a\u043e\u0434\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u043a\u043e\u0434\u0430, \u0442\u043e \u043e\u043d\u0438 AOT-\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>dex2oat<\/code>, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 <code>.oat<\/code> \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0422\u043e, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>Profile<\/code><strong>.<\/strong><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 JIT \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e \u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0432 Profile \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f AOT-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u2013&nbsp;\u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0430\u043d\u0435\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430\u043d\u043e\u0432\u043e. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e.<\/p>\n<p>\u0421 Android 9.0 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c <strong><em>\u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438,<\/em><\/strong> \u0442.\u0435. \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e \u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 Google Play. \u0418 \u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043d\u043e\u0432\u044b\u0435  \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438\u0437 \u0441\u0442\u043e\u0440\u0430.<\/p>\n<figure class=\"full-width\">\n<div><figcaption> \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 Google I\/O 2022<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0438\u043d\u0443\u0441:&nbsp;\u0435\u0441\u043b\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0435\u0449\u0451 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0441 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Google \u043f\u0440\u043e Baseline Profiles. \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043a\u0430\u0447\u043e\u043a \u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u2014 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 Baseline Profiles.<\/p>\n<p>\u0412&nbsp;\u044d\u0442\u043e\u043c \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b Baseline Profiles: \u043c\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043a\u0430\u0436\u0443\u0442 \u0410\u043d\u0434\u0440\u043e\u0438\u0434\u0443, \u0447\u0442\u043e&nbsp;\u043d\u0430\u0434\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c AOT&nbsp;\u2014 \u0442\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0443\u0434\u0435\u0442&nbsp;\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439, \u043a\u0430\u043a&nbsp;\u043f\u043e\u0441\u043b\u0435 10\u201320&nbsp;\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Baseline Profiles.<\/p>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c Baseline Profile<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c benchmark (\u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0438\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435) \u0441 \u0442\u0438\u043f\u043e\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438\u043d\u0433\u0430 <code>macrobenchmark<\/code>.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u043c \u043c\u0430\u043a\u0440\u043e\u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a-\u0442\u0435\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 BaselineProfileGenerator \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0438\u0437 <a href=\"https:\/\/developer.android.com\/codelabs\/android-baseline-profiles-improve#4\">Google codelab<\/a>.<\/p>\n<pre><code class=\"kotlin\">@RunWith(AndroidJUnit4::class) class BaselineProfileGenerator {   @get:Rule  val baselineProfile = BaselineProfileRule()   @Test  fun generate() {    baselineProfile.collectBaselineProfile(packageName = \/* \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c packageName *\/) { \/\/ \u0422\u0443\u0442 \u043f\u0438\u0448\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u0441\u0432\u043e\u0439 \u0444\u043b\u043e\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \/\/ \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b      startActivityAndWait()    }  } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0451 \u0435\u0449\u0451 \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <code>androidx.benchmark:benchmark-macro-junit4:1.1.*<\/code>, \u0442\u043e \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442 \u043d\u0430 <strong>\u0440\u0443\u0442\u043e\u0432\u043e\u043c<\/strong> \u0434\u0435\u0432\u0430\u0439\u0441\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0431\u0435\u0437 Google Services. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435:<\/p>\n<pre><code class=\"bash\">adb root<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438\u043d\u0433\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438<code>1.2.0-alpha06,<\/code><\/p>\n<p><code>androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha*<\/code><\/p>\n<p>\u0442\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Baseline Profile \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u2014 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f root-\u043f\u0440\u0430\u0432\u0430.<\/p>\n<p>\u0412\u0441\u0451!<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0435\u0441\u0442, \u0442\u043e \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d *.txt \u0444\u0430\u0439\u043b \u0441 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>adb pull<\/code> (\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0435\u0441\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0435\u0441\u0442\u0430) \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 <code>\/app\/scr\/main<\/code><\/p>\n<h3>\u041a\u0430\u043a \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430<\/h3>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043c\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a app-\u043c\u043e\u0434\u0443\u043b\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0412 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u044d\u0442\u043e \u0432\u0441\u0451, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043f\u043e\u043c\u0438\u043c\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432 <code>\/app\/src\/main<\/code><\/p>\n<pre><code>implementation project(\"androidx.profileinstaller:profileinstaller\")<\/code><\/pre>\n<p>\u0421\u0430\u043c \u0442\u0435\u0441\u0442 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"kotlin\">@RunWith(AndroidJUnit4::class) class BaselineProfileBenchmark {    @get:Rule   val benchmarkRule = MacrobenchmarkRule()    @Test   fun startupNoCompilation() {     startup(None())   }    @Test   fun startupBaselineProfile() {     startup(         Partial(             baselineProfileMode = Require         )     )   }    fun startup(compilationMode: CompilationMode) {     benchmarkRule.measureRepeated(         packageName = \/* \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c packageName *\/,         metrics = listOf(StartupTimingMetric()),         iterations = 10,         compilationMode = compilationMode,         startupMode = COLD     ) {       pressHome()       startActivityAndWait()     }   } }<\/code><\/pre>\n<p>\u0421\u043c\u044b\u0441\u043b \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u043c\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>metrics<\/code> \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c <code>packageName<\/code>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0432 \u0442\u0435\u0441\u0442\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f compilationMode: \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0447\u0438\u0441\u0442\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u0435\u0437 baseline-\u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a-\u0442\u0435\u0441\u0442: \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>iterations<\/code>:<\/p>\n<pre><code>BaselineProfileBenchmark_startupNoCompilation timeToInitialDisplayMs   min   925.8,   median 1,047.9,   max 1,199.5 Traces: Iteration 0 1 2 3 4 5 6 7 8 9<\/code><\/pre>\n<pre><code>BaselineProfileBenchmark_startupBaselineProfile timeToInitialDisplayMs   min   761.5,   median   871.2,   max 1,113.8 Traces: Iteration 0 1 2 3 4 5 6 7 8 9<\/code><\/pre>\n<p>\u041f\u043e \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 20%<\/p>\n<p>\u0410 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u0430\u043c\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u043b\u043e\u0443 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Baseline Profile. Google \u0441\u043e\u0432\u0435\u0442\u0443\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u0434\u0430\u0436\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Profile \u0432 \u0441\u0432\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0445 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/app\/src\/main<\/code>.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u0442\u043e\u0440. \u0421\u043f\u0443\u0441\u0442\u044f \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438<em>.<\/em><\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432, \u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u0438:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u043d\u0430\u0448\u0443 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f Baseline Profiles \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435.<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c \u0441\u0445\u043e\u0436\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e: \u043f\u0440\u0438 \u0440\u0435\u043b\u0438\u0437\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u0431\u044b\u043b\u043e \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u043e, \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0443\u0436\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043e\u0442 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0438\u0434\u0438\u0442\u0435, <em>\u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a<\/em> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0448\u0435, \u0447\u0435\u043c <em>\u0441\u0438\u043d\u0438\u0439<\/em>. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u043f\u0435\u0440\u0432\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0431\u044b\u043b\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0417\u0434\u0435\u0441\u044c \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0438\u0436\u0435 \u0441\u0438\u043d\u0435\u0433\u043e, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432 APK.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c, \u0447\u0435\u0433\u043e \u043c\u044b \u0438 \u0434\u043e\u0431\u0438\u0432\u0430\u043b\u0438\u0441\u044c.<\/p>\n<blockquote>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u2013 \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438 \u2013 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u043d\u0438\u0436\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0440\u0442\u0430. \u041f\u043e \u0438\u0434\u0435\u0435, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0441\u0438\u043d\u0438\u0439.<\/p>\n<p>\u041c\u044b \u043f\u043e\u043a\u0430 \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<p>\u043f\u0435\u0440\u0432\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u044b\u0435 \u0438 \u043c\u043e\u0449\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 &#8212; \u0443 \u043d\u0438\u0445 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432\u0441\u0451 \u0431\u044b\u0441\u0442\u0440\u0435\u0435; \u0440\u0430\u043d\u0434\u043e\u043c, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c.  <\/p>\n<p>\u0410 \u043a\u0430\u043a\u0438\u0435 \u0443 \u0432\u0430\u0441 \u0432\u0435\u0440\u0441\u0438\u0438? \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438!<\/p>\n<\/blockquote>\n<h3>\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0434\u043b\u044f \u0414\u0440\u0438\u043d\u043a\u0438\u0442<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043f\u0440\u043e\u043a\u0430\u0447\u043a\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u0430\u0440\u0442\u043e\u0439, \u0434\u0438\u0430\u043b\u043e\u0433\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0441\u043a\u0440\u043e\u043b\u043b\u043e\u043c \u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044e \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e? \u0422\u0430\u043a \u043a\u0430\u043a Profile \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 AOT-\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u043e\u043b\u043a\u043d\u0451\u0442\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Baseline Profile \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u043b\u043e\u0443:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u043a\u0430\u0440\u0442\u0443 \u0438 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043a\u043e\u0444\u0435\u0439\u043d\u044e \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u043d\u044e;<\/p>\n<\/li>\n<li>\n<p>\u0432 \u043c\u0435\u043d\u044e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442 \u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c, \u043a\u0430\u043a \u0437\u0430\u043a\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439.<\/p>\n<h4>\u0428\u0430\u0433 1: Runtime Permissions<\/h4>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0441\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 UI-\u0442\u0435\u0441\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043a\u043b\u0438\u043a\u0438\u0432\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438, \u043d\u043e \u0442\u0430\u043a \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0449\u0435 \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c!<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0445\u043e\u0442\u0435\u043b\u0438<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-348256","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=348256"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348256\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}