हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
मेट्रिक टेस्ट
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
मेट्रिक टेस्ट का इस्तेमाल आम तौर पर, हार्डवेयर एब्स्ट्रैक्शन लेयर (एचएएल) को टेस्ट करने या सीधे तौर पर लोअर-लेवल सिस्टम सेवाओं के साथ इंटरैक्ट करने के लिए किया जाता है. लगातार टेस्टिंग की सेवा का फ़ायदा पाने के लिए, मेट्रिक टेस्ट को google-benchmark फ़्रेमवर्क के साथ बनाया जाना चाहिए.
उदाहरण
मेट्रिक टेस्ट मॉड्यूल के सेटअप का सैंपल यहां देखें:
bionic/benchmarks/bionic-benchmarks
चरणों की खास जानकारी
- टेस्ट मॉड्यूल कॉन्फ़िगरेशन फ़ाइल में
BUILD_NATIVE_BENCHMARK
बिल्ड नियम का इस्तेमाल किया जाना चाहिए, ताकि google-benchmark की डिपेंडेंसी अपने-आप शामिल हो जाएं.
make की मदद से टेस्ट मॉड्यूल बनाएं:
make -j40 bionic-benchmarks
Trade Federation टेस्ट हार्नेस की मदद से, अपने-आप इंस्टॉल और चलाने की सुविधा:
make tradefed-all -j
tradefed.sh run template/local_min --template:map test=bionic-benchmarks
मैन्युअल तरीके से इंस्टॉल और चलाने के लिए, यह तरीका अपनाएं:
जनरेट किए गए टेस्ट बाइनरी को डिवाइस पर पुश करें:
adb push ${OUT}/data/benchmarktest/bionic-benchmarks/bionic-benchmarks32 \
/data/benchmarktest/bionic-benchmarks/bionic-benchmarks32
डिवाइस पर टेस्ट बाइनरी को शुरू करके टेस्ट चलाएं:
adb shell /data/benchmarktest/bionic-benchmarks/bionic-benchmarks32
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# Metric tests are typically used for exercising hardware abstraction\nlayers (HALs) or interacting directly with lower-level system services. To\nleverage continuous testing service, metric tests should be built with\nthe [google-benchmark](https://github.com/google/benchmark)\nframework.\n\nExample\n-------\n\nSee a sample metric test module setup at:\n[bionic/benchmarks/bionic-benchmarks](https://android.googlesource.com/platform/bionic/+/android16-release/benchmarks/bionic_benchmarks.cpp)\n\nSummary of steps\n----------------\n\n1. Test module configuration file should use the `BUILD_NATIVE_BENCHMARK` build rule so that google-benchmark dependencies are included automatically.\n2. Build the test module with make:\n\n make -j40 bionic-benchmarks\n\n3. Automatic installation and run with the Trade Federation test harness:\n\n make tradefed-all -j\n tradefed.sh run template/local_min --template:map test=bionic-benchmarks\n\n4. Manually install and run like so:\n\n 1. Push the generated test binary onto device:\n\n adb push ${OUT}/data/benchmarktest/bionic-benchmarks/bionic-benchmarks32 \\\n /data/benchmarktest/bionic-benchmarks/bionic-benchmarks32\n\n 2. Execute the test by invoking test binary on device:\n\n adb shell /data/benchmarktest/bionic-benchmarks/bionic-benchmarks32"]]