Stay organized with collections
Save and categorize content based on your preferences.
ProcessHealthStats
public
final
class
ProcessHealthStats
extends Object
Keys for HealthStats
returned from
HealthStats.getStats(int)
with the
UidHealthStats.STATS_PROCESSES
key.
Summary
Constants |
int |
MEASUREMENT_ANR_COUNT
Key for a measurement of the number of ANRs that happened in this process.
|
int |
MEASUREMENT_CRASHES_COUNT
Key for a measurement of the number of crashes that happened in this process.
|
int |
MEASUREMENT_FOREGROUND_MS
Key for a measurement of the number of milliseconds this process spent with
an activity in the foreground.
|
int |
MEASUREMENT_STARTS_COUNT
Key for a measurement of the number of times this process was started for any reason.
|
int |
MEASUREMENT_SYSTEM_TIME_MS
Key for a measurement of number of millseconds the CPU spent running in kernel space
for this process.
|
int |
MEASUREMENT_USER_TIME_MS
Key for a measurement of number of millseconds the CPU spent running in user space
for this process.
|
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
MEASUREMENT_ANR_COUNT
public static final int MEASUREMENT_ANR_COUNT
Key for a measurement of the number of ANRs that happened in this process.
Constant Value:
30005
(0x00007535)
MEASUREMENT_CRASHES_COUNT
public static final int MEASUREMENT_CRASHES_COUNT
Key for a measurement of the number of crashes that happened in this process.
Constant Value:
30004
(0x00007534)
MEASUREMENT_FOREGROUND_MS
public static final int MEASUREMENT_FOREGROUND_MS
Key for a measurement of the number of milliseconds this process spent with
an activity in the foreground.
Constant Value:
30006
(0x00007536)
MEASUREMENT_STARTS_COUNT
public static final int MEASUREMENT_STARTS_COUNT
Key for a measurement of the number of times this process was started for any reason.
Constant Value:
30003
(0x00007533)
MEASUREMENT_SYSTEM_TIME_MS
public static final int MEASUREMENT_SYSTEM_TIME_MS
Key for a measurement of number of millseconds the CPU spent running in kernel space
for this process.
Constant Value:
30002
(0x00007532)
MEASUREMENT_USER_TIME_MS
public static final int MEASUREMENT_USER_TIME_MS
Key for a measurement of number of millseconds the CPU spent running in user space
for this process.
Constant Value:
30001
(0x00007531)
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.
[[["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 2025-02-10 UTC."],[],[],null,["# ProcessHealthStats\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Constants](#constants) \\| [Inherited Methods](#inhmethods) \n\nProcessHealthStats\n==================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/os/health/ProcessHealthStats \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\nfinal\n\nclass\nProcessHealthStats\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.ProcessHealthStats |\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_PROCESSES](/reference/android/os/health/UidHealthStats#STATS_PROCESSES) key.\n\nSummary\n-------\n\n| ### Constants ||\n|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [MEASUREMENT_ANR_COUNT](/reference/android/os/health/ProcessHealthStats#MEASUREMENT_ANR_COUNT) Key for a measurement of the number of ANRs that happened in this process. |\n| `int` | [MEASUREMENT_CRASHES_COUNT](/reference/android/os/health/ProcessHealthStats#MEASUREMENT_CRASHES_COUNT) Key for a measurement of the number of crashes that happened in this process. |\n| `int` | [MEASUREMENT_FOREGROUND_MS](/reference/android/os/health/ProcessHealthStats#MEASUREMENT_FOREGROUND_MS) Key for a measurement of the number of milliseconds this process spent with an activity in the foreground. |\n| `int` | [MEASUREMENT_STARTS_COUNT](/reference/android/os/health/ProcessHealthStats#MEASUREMENT_STARTS_COUNT) Key for a measurement of the number of times this process was started for any reason. |\n| `int` | [MEASUREMENT_SYSTEM_TIME_MS](/reference/android/os/health/ProcessHealthStats#MEASUREMENT_SYSTEM_TIME_MS) Key for a measurement of number of millseconds the CPU spent running in kernel space for this process. |\n| `int` | [MEASUREMENT_USER_TIME_MS](/reference/android/os/health/ProcessHealthStats#MEASUREMENT_USER_TIME_MS) Key for a measurement of number of millseconds the CPU spent running in user space for this process. |\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_ANR_COUNT\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_ANR_COUNT\n```\n\nKey for a measurement of the number of ANRs that happened in this process.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n30005\n(0x00007535)\n\n\n### MEASUREMENT_CRASHES_COUNT\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_CRASHES_COUNT\n```\n\nKey for a measurement of the number of crashes that happened in this process.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n30004\n(0x00007534)\n\n\n### MEASUREMENT_FOREGROUND_MS\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_FOREGROUND_MS\n```\n\nKey for a measurement of the number of milliseconds this process spent with\nan activity in the foreground.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n30006\n(0x00007536)\n\n\n### MEASUREMENT_STARTS_COUNT\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_STARTS_COUNT\n```\n\nKey for a measurement of the number of times this process was started for any reason.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n30003\n(0x00007533)\n\n\n### MEASUREMENT_SYSTEM_TIME_MS\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_SYSTEM_TIME_MS\n```\n\nKey for a measurement of number of millseconds the CPU spent running in kernel space\nfor this process.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n30002\n(0x00007532)\n\n\n### MEASUREMENT_USER_TIME_MS\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int MEASUREMENT_USER_TIME_MS\n```\n\nKey for a measurement of number of millseconds the CPU spent running in user space\nfor this process.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n30001\n(0x00007531)"]]