- सिंटैक्स:
<profileable android:shell=["true" | "false"] android:enabled=["true" | "false"] />
- इसमें शामिल है:
<application>
- विवरण:
- बताता है कि प्रोफ़ाइलर इस ऐप्लिकेशन को कैसे ऐक्सेस कर सकते हैं.
- विशेषताएं:
android:shell
- अभी तक किसी भी व्यक्ति ने चेक इन नहीं किया है
तय करती है कि डिवाइस का उपयोगकर्ता, लोकल डीबगिंग की मदद से इस ऐप्लिकेशन की प्रोफ़ाइल बना सकता है या नहीं
नीचे कुछ ऐसे टूल दिए गए हैं:
- Android 11 और उससे पहले के वर्शन वाले
android.os.Trace
ट्रेस करने वाले एपीआई simpleperf
am profile
निर्देशperfetto
प्रोफ़ाइलर (नेटिव मेमोरी, Java मेमोरी, सीपीयू)
false
पर सेट है, तो ये टूल और एपीआई सिर्फ़ तब काम करते हैं, जब कोई ऐप्लिकेशनdebuggable
. डीबग करने लायक ऐप्लिकेशन की परफ़ॉर्मेंस में काफ़ी कमी आती है. साथ ही, इनकी परफ़ॉर्मेंस में अलग-अलग तरह की गिरावट आती है. समय को सही तरीके से मेज़र किया जा सकता है. स्थानीय परफ़ॉर्मेंस के लिए इस एलिमेंट का सुझाव दिया जाता है मेज़रमेंट, ताकि आपको सटीक नतीजे मिल सकें.इस एलिमेंट को इस तरह से डिज़ाइन किया गया है कि रिलीज़ या प्रोडक्शन में इस्तेमाल किया जा सके. साथ ही, इसे लोकल प्रोफ़ाइलिंग के लिए बनाया गया हो. इससे डेटा के एक्सपोज़र का कम से कम जोखिम होता है: होस्ट प्रोफ़ाइलिंग टूल से, मेमोरी के किसी भी डेटा को पढ़ा नहीं जा सकता शेल प्रोसेस में जाता है. सिर्फ़ स्टैक ट्रेस ही पढ़े जा सकते हैं. ये आम तौर पर, उलझाने वाले होते हैं या इनमें सिंबल नहीं होते मौजूदा मॉडल का इस्तेमाल करता है.
- Android 11 और उससे पहले के वर्शन वाले
android:enabled
- अभी तक किसी भी व्यक्ति ने चेक इन नहीं किया है
इस नीति से पता चलता है कि ऐप्लिकेशन की प्रोफ़ाइल सिस्टम सेवाओं या शेल टूल से बनाई जा सकती है या नहीं.
बाद वाले इंप्रेशन के लिए,
android:shell
को भी सेट किया जा सकता है. अगर गलत है, तो ऐप्लिकेशन की प्रोफ़ाइल बिलकुल भी नहीं बनाई जा सकती. डिफ़ॉल्ट रूप से, 'सही' होता है. इस एट्रिब्यूट को एपीआई लेवल 30 में जोड़ा गया था.
- इसमें पेश किया गया:
- एपीआई लेवल 29
<प्रोफ़ाइल करने लायक>
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# <profileable\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cprofileable android:shell=[\"true\" | \"false\"] android:enabled=[\"true\" | \"false\"] /\u003e\n ```\n\ncontained in:\n: [\u003capplication\u003e](/guide/topics/manifest/application-element)\n\ndescription:\n: Specifies how profilers can access this application.\n\nattributes:\n:\n\n `android:shell`\n :\n Specifies whether the user of the device can profile this application through local debugging\n tools such as the following:\n\n - [android.os.Trace](/reference/kotlin/android/os/Trace) tracing APIs (Android 11 and lower)\n - [simpleperf](/ndk/guides/simpleperf)\n - [am profile](/studio/command-line/adb#am) commands\n - [`perfetto` profilers](/studio/command-line/perfetto) (native memory, Java memory, CPU)\n\n\n If this isn't set, or is set to `false`, these tools and APIs work only when an app is\n [debuggable](/guide/topics/manifest/application-element#debug).\n Debuggable apps incur significant and varied performance degradation and aren't useful for\n measuring timing accurately. This element is strongly recommended for local performance\n measurements, to capture accurate results.\n\n This element is designed to be usable in release, or production, builds to enable local profiling.\n It incurs minimal risk of data exposure: no memory data is readable by the host profiling tools\n and the shell process. Only stack traces are readable, which are typically obfuscated or lacking symbols\n in release builds.\n\n:\n\n `android:enabled`\n :\n Specifies whether the application can be profiled by system services or shell tools.\n For the latter, you also set [`android:shell`](#shell).\n If false, the application can't be profiled at all. The default is true.\n\n This attribute was added in API level 30.\n\nintroduced in:\n: API Level 29"]]