Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
TfObjectTracker
public
class
TfObjectTracker
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.invoker.logger.TfObjectTracker
|
A utility to track the usage of the different Trade Fedederation objects.
Summary
Public methods |
static
void
|
clearTracking()
Stop tracking the current invocation.
|
static
void
|
countWithParents(Class<?> object)
Count the occurrence of a give class and its super classes until the Tradefed interface.
|
static
void
|
directCount(String className, long occurrences)
Count explicitly one class and its occurrences
|
static
|
getUsage()
Returns the usage of the tracked objects.
|
Fields
TF_OBJECTS_TRACKING_KEY
public static final String TF_OBJECTS_TRACKING_KEY
Public methods
clearTracking
public static void clearTracking ()
Stop tracking the current invocation. This is called automatically by the harness.
countWithParents
public static void countWithParents (Class<?> object)
Count the occurrence of a give class and its super classes until the Tradefed interface.
directCount
public static void directCount (String className,
long occurrences)
Count explicitly one class and its occurrences
Parameters |
className |
String : The object to track |
occurrences |
long : current num of known occurrences |
getUsage
public static getUsage ()
Returns the usage of the tracked objects.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[],null,["# TfObjectTracker\n===============\n\n\n`\npublic\n\n\nclass\nTfObjectTracker\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.invoker.logger.TfObjectTracker |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA utility to track the usage of the different Trade Fedederation objects.\n\nSummary\n-------\n\n| ### Fields ||\n|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final String` | [TF_OBJECTS_TRACKING_KEY](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#TF_OBJECTS_TRACKING_KEY) |\n\n| ### Public methods ||\n|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static void` | ` `[clearTracking](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#clearTracking())`() ` Stop tracking the current invocation. |\n| ` static void` | ` `[countWithParents](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#countWithParents(java.lang.Class\u003c?\u003e))`(Class\u003c?\u003e object) ` Count the occurrence of a give class and its super classes until the Tradefed interface. |\n| ` static void` | ` `[directCount](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#directCount(java.lang.String,%20long))`(String className, long occurrences) ` Count explicitly one class and its occurrences |\n| ` static ` | ` `[getUsage](../../../../../../../reference/tradefed/com/android/tradefed/invoker/logger/TfObjectTracker.html#getUsage())`() ` Returns the usage of the tracked objects. |\n\nFields\n------\n\n### TF_OBJECTS_TRACKING_KEY\n\n```\npublic static final String TF_OBJECTS_TRACKING_KEY\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### clearTracking\n\n```\npublic static void clearTracking ()\n```\n\nStop tracking the current invocation. This is called automatically by the harness.\n\n\u003cbr /\u003e\n\n### countWithParents\n\n```\npublic static void countWithParents (Class\u003c?\u003e object)\n```\n\nCount the occurrence of a give class and its super classes until the Tradefed interface.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------|\n| `object` | `Class` \u003cbr /\u003e |\n\n### directCount\n\n```\npublic static void directCount (String className, \n long occurrences)\n```\n\nCount explicitly one class and its occurrences\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|-------------------------------------------------|\n| `className` | `String`: The object to track \u003cbr /\u003e |\n| `occurrences` | `long`: current num of known occurrences \u003cbr /\u003e |\n\n### getUsage\n\n```\npublic static getUsage ()\n```\n\nReturns the usage of the tracked objects.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |"]]