Stay organized with collections
Save and categorize content based on your preferences.
PidHealthStats
public
final
class
PidHealthStats
extends Object
Keys for HealthStats
returned from
HealthStats.getStats(int)
with the
UidHealthStats.STATS_PIDS
key.
The values coming from PidHealthStats are a little bit different from
the other HealthStats values. These values are not aggregate or historical
values, but instead live values from when the snapshot is taken. These
tend to be more useful in debugging rogue processes than in gathering
aggregate metrics across the fleet of devices.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Constants
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 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# PidHealthStats\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Constants](#constants) \\| [Inherited Methods](#inhmethods) \n\nPidHealthStats\n==============\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/os/health/PidHealthStats \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\nfinal\n\nclass\nPidHealthStats\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.os.health.PidHealthStats |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nKeys for [HealthStats](/reference/android/os/health/HealthStats) returned from\n[HealthStats.getStats(int)](/reference/android/os/health/HealthStats#getStats(int)) with the\n[UidHealthStats.STATS_PIDS](/reference/android/os/health/UidHealthStats#STATS_PIDS) key.\n\n\nThe values coming from PidHealthStats are a little bit different from\nthe other HealthStats values. These values are not aggregate or historical\nvalues, but instead live values from when the snapshot is taken. These\ntend to be more useful in debugging rogue processes than in gathering\naggregate metrics across the fleet of devices.\n\nSummary\n-------\n\n| ### Constants ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [MEASUREMENT_WAKE_NESTING_COUNT](/reference/android/os/health/PidHealthStats#MEASUREMENT_WAKE_NESTING_COUNT) Key for a measurement of the current nesting depth of wakelocks for this process. |\n| `int` | [MEASUREMENT_WAKE_START_MS](/reference/android/os/health/PidHealthStats#MEASUREMENT_WAKE_START_MS) Key for a measurement of the time in the [SystemClock.elapsedRealtime()](/reference/android/os/SystemClock#elapsedRealtime()) timebase that a wakelock was first acquired in this process. |\n| `int` | [MEASUREMENT_WAKE_SUM_MS](/reference/android/os/health/PidHealthStats#MEASUREMENT_WAKE_SUM_MS) Key for a measurement of the total number of milleseconds that this process has held a wake lock. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nConstants\n---------\n\n### MEASUREMENT_WAKE_NESTING_COUNT\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_WAKE_NESTING_COUNT\n```\n\nKey for a measurement of the current nesting depth of wakelocks for this process.\nThat is to say, the number of times a nested wakelock has been started but not\nstopped. A high number here indicates an improperly paired wakelock acquire/release\ncombination.\n\n\nMore details on the individual wake locks is available\nby getting the [UidHealthStats.TIMERS_WAKELOCKS_FULL](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_FULL),\n[UidHealthStats.TIMERS_WAKELOCKS_PARTIAL](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_PARTIAL),\n[UidHealthStats.TIMERS_WAKELOCKS_WINDOW](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_WINDOW)\nand [UidHealthStats.TIMERS_WAKELOCKS_DRAW](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_DRAW) keys.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n20001\n(0x00004e21)\n\n\n### MEASUREMENT_WAKE_START_MS\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_WAKE_START_MS\n```\n\nKey for a measurement of the time in the [SystemClock.elapsedRealtime()](/reference/android/os/SystemClock#elapsedRealtime())\ntimebase that a wakelock was first acquired in this process.\n\n\nMore details on the individual wake locks is available\nby getting the [UidHealthStats.TIMERS_WAKELOCKS_FULL](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_FULL),\n[UidHealthStats.TIMERS_WAKELOCKS_PARTIAL](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_PARTIAL),\n[UidHealthStats.TIMERS_WAKELOCKS_WINDOW](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_WINDOW)\nand [UidHealthStats.TIMERS_WAKELOCKS_DRAW](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_DRAW) keys.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n20003\n(0x00004e23)\n\n\n### MEASUREMENT_WAKE_SUM_MS\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_WAKE_SUM_MS\n```\n\nKey for a measurement of the total number of milleseconds that this process\nhas held a wake lock.\n\n\nMore details on the individual wake locks is available\nby getting the [UidHealthStats.TIMERS_WAKELOCKS_FULL](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_FULL),\n[UidHealthStats.TIMERS_WAKELOCKS_PARTIAL](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_PARTIAL),\n[UidHealthStats.TIMERS_WAKELOCKS_WINDOW](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_WINDOW)\nand [UidHealthStats.TIMERS_WAKELOCKS_DRAW](/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_DRAW) keys.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n20002\n(0x00004e22)"]]