27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main
এর পরিবর্তে android-latest-release
ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
রিসোর্সমেট্রিক ইউটিল
public class ResourceMetricUtil
extends Object
java.lang.অবজেক্ট |
↳ | com.android.tradefed.monitoring.collector.ResourceMetricUtil |
মেট্রিক্স রচনার জন্য ইউটিলিটি ফাংশন।
সারাংশ
পাবলিক পদ্ধতি |
---|
static float | ConvertedMetricValue (String original, float conversionDivisor) মেট্রিক মানকে বিভিন্ন ইউনিটে রূপান্তর করে এবং আউটপুট মান ফর্ম্যাট করে। |
static | GetCommandResponse ( IDeviceManager deviceManager, String serial, String cmd, long timeoutMs) adb কমান্ড কার্যকর করে এবং সফল হলে প্রতিক্রিয়া প্রদান করে। |
static Timestamp | GetCurrentTimestamp () সিস্টেম UTC ঘড়ি থেকে বর্তমান টাইমস্ট্যাম্প পায়। |
static float | RoundedMetricValue (String original) মেট্রিক মান পার্স করুন এবং ফর্ম্যাট করুন। |
পাবলিক কনস্ট্রাক্টর
রিসোর্সমেট্রিক ইউটিল
public ResourceMetricUtil ()
পাবলিক পদ্ধতি
ConvertedMetricValue
public static float ConvertedMetricValue (String original,
float conversionDivisor)
মেট্রিক মানকে বিভিন্ন ইউনিটে রূপান্তর করে এবং আউটপুট মান ফর্ম্যাট করে।
পরামিতি |
---|
original | String : মূল মান স্ট্রিং। |
conversionDivisor | float : ইউনিট রূপান্তরের জন্য ভাজক। |
রিটার্নস |
---|
float | আউটপুট ফ্লোট মান। |
নিক্ষেপ করে |
---|
NumberFormatException | যদি মূল স্ট্রিং নাল হয়। |
GetCommandResponse
public static GetCommandResponse (IDeviceManager deviceManager,
String serial,
String cmd,
long timeoutMs)
adb কমান্ড কার্যকর করে এবং সফল হলে প্রতিক্রিয়া প্রদান করে।
পরামিতি |
---|
deviceManager | IDeviceManager : "উপলভ্য" ডিভাইসগুলিতে কমান্ড কার্যকর করার জন্য IDeviceManager উদাহরণ। |
serial | String : ডিভাইস সিরিয়াল। |
cmd | String : কমান্ড স্ট্রিং। |
timeoutMs | long : মিলিসেকেন্ডে অপেক্ষা করার সময়। |
GetCurrentTimestamp
public static Timestamp GetCurrentTimestamp ()
সিস্টেম UTC ঘড়ি থেকে বর্তমান টাইমস্ট্যাম্প পায়।
রাউন্ডেডমেট্রিক ভ্যালু
public static float RoundedMetricValue (String original)
মেট্রিক মান পার্স করুন এবং ফর্ম্যাট করুন।
পরামিতি |
---|
original | String : মূল মান স্ট্রিং। |
রিটার্নস |
---|
float | আউটপুট ফ্লোট মান। |
নিক্ষেপ করে |
---|
NumberFormatException | যদি মূল স্ট্রিং নাল হয়। |
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 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-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# ResourceMetricUtil\n==================\n\n\n`\npublic\n\n\nclass\nResourceMetricUtil\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.monitoring.collector.ResourceMetricUtil |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nUtility functions for composing metrics.\n\nSummary\n-------\n\n| ### Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[ResourceMetricUtil](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/ResourceMetricUtil.html#ResourceMetricUtil())`() ` |\n\n| ### Public methods ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static float` | ` `[ConvertedMetricValue](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/ResourceMetricUtil.html#ConvertedMetricValue(java.lang.String,%20float))`(String original, float conversionDivisor) ` Converts the metric value to different units and formats the output value. |\n| ` static ` | ` `[GetCommandResponse](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/ResourceMetricUtil.html#GetCommandResponse(com.android.tradefed.device.IDeviceManager,%20java.lang.String,%20java.lang.String,%20long))`(`[IDeviceManager](../../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceManager.html)` deviceManager, String serial, String cmd, long timeoutMs) ` Executes adb command and returns response if succeed. |\n| ` static Timestamp` | ` `[GetCurrentTimestamp](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/ResourceMetricUtil.html#GetCurrentTimestamp())`() ` Gets current timestamp from system UTC clock. |\n| ` static float` | ` `[RoundedMetricValue](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/ResourceMetricUtil.html#RoundedMetricValue(java.lang.String))`(String original) ` Parse and format the metric value. |\n\nPublic constructors\n-------------------\n\n### ResourceMetricUtil\n\n```\npublic ResourceMetricUtil ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### ConvertedMetricValue\n\n```\npublic static float ConvertedMetricValue (String original, \n float conversionDivisor)\n```\n\nConverts the metric value to different units and formats the output value.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------------|--------------------------------------------------|\n| `original` | `String`: the original value string. \u003cbr /\u003e |\n| `conversionDivisor` | `float`: the divisor for unit conversion. \u003cbr /\u003e |\n\n| Returns ||\n|---------|--------------------------------|\n| `float` | The output float value. \u003cbr /\u003e |\n\n| Throws ||\n|-------------------------|---------------------------------|\n| `NumberFormatException` | if the original string is null. |\n\n### GetCommandResponse\n\n```\npublic static GetCommandResponse (../../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceManager.html deviceManager, \n String serial, \n String cmd, \n long timeoutMs)\n```\n\nExecutes adb command and returns response if succeed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------|----------------------------------------------------------------------------------------------------|\n| `deviceManager` | `IDeviceManager`: the IDeviceManager instance for executing command on \"Available\" devices. \u003cbr /\u003e |\n| `serial` | `String`: the device serial. \u003cbr /\u003e |\n| `cmd` | `String`: the command string. \u003cbr /\u003e |\n| `timeoutMs` | `long`: the time to wait in milliseconds. \u003cbr /\u003e |\n\n| Returns ||\n|---|--------------------------------------------------------------------------------------------------------------------------|\n| | A [CommandResult](../../../../../../../reference/tradefed/com/android/tradefed/util/CommandResult.html) instance. \u003cbr /\u003e |\n\n### GetCurrentTimestamp\n\n```\npublic static Timestamp GetCurrentTimestamp ()\n```\n\nGets current timestamp from system UTC clock.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------|--------|\n| `Timestamp` | \u003cbr /\u003e |\n\n### RoundedMetricValue\n\n```\npublic static float RoundedMetricValue (String original)\n```\n\nParse and format the metric value.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|---------------------------------------------|\n| `original` | `String`: the original value string. \u003cbr /\u003e |\n\n| Returns ||\n|---------|--------------------------------|\n| `float` | The output float value. \u003cbr /\u003e |\n\n| Throws ||\n|-------------------------|---------------------------------|\n| `NumberFormatException` | if the original string is null. |"]]