Stay organized with collections
Save and categorize content based on your preferences.
ProcessHealthStats
class ProcessHealthStats
Keys for HealthStats
returned from HealthStats.getStats(int)
with the UidHealthStats.STATS_PROCESSES
key.
Summary
Constants |
static Int |
Key for a measurement of the number of ANRs that happened in this process.
|
static Int |
Key for a measurement of the number of crashes that happened in this process.
|
static Int |
Key for a measurement of the number of milliseconds this process spent with an activity in the foreground.
|
static Int |
Key for a measurement of the number of times this process was started for any reason.
|
static Int |
Key for a measurement of number of millseconds the CPU spent running in kernel space for this process.
|
static Int |
Key for a measurement of number of millseconds the CPU spent running in user space for this process.
|
Constants
MEASUREMENT_ANR_COUNT
static val MEASUREMENT_ANR_COUNT: Int
Key for a measurement of the number of ANRs that happened in this process.
Value: 30005
MEASUREMENT_CRASHES_COUNT
static val MEASUREMENT_CRASHES_COUNT: Int
Key for a measurement of the number of crashes that happened in this process.
Value: 30004
MEASUREMENT_FOREGROUND_MS
static val MEASUREMENT_FOREGROUND_MS: Int
Key for a measurement of the number of milliseconds this process spent with an activity in the foreground.
Value: 30006
MEASUREMENT_STARTS_COUNT
static val MEASUREMENT_STARTS_COUNT: Int
Key for a measurement of the number of times this process was started for any reason.
Value: 30003
MEASUREMENT_SYSTEM_TIME_MS
static val MEASUREMENT_SYSTEM_TIME_MS: Int
Key for a measurement of number of millseconds the CPU spent running in kernel space for this process.
Value: 30002
MEASUREMENT_USER_TIME_MS
static val MEASUREMENT_USER_TIME_MS: Int
Key for a measurement of number of millseconds the CPU spent running in user space for this process.
Value: 30001
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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nProcessHealthStats\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/health/ProcessHealthStats \"View this page in Java\") \n\n```\nclass ProcessHealthStats\n```\n\n|---|-------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.os.health.ProcessHealthStats](#) |\n\nKeys for [HealthStats](/reference/kotlin/android/os/health/HealthStats) returned from [HealthStats.getStats(int)](/reference/kotlin/android/os/health/HealthStats#getStats(kotlin.Int)) with the [UidHealthStats.STATS_PROCESSES](/reference/kotlin/android/os/health/UidHealthStats#STATS_PROCESSES:kotlin.Int) key.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MEASUREMENT_ANR_COUNT](#MEASUREMENT_ANR_COUNT:kotlin.Int) Key for a measurement of the number of ANRs that happened in this process. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MEASUREMENT_CRASHES_COUNT](#MEASUREMENT_CRASHES_COUNT:kotlin.Int) Key for a measurement of the number of crashes that happened in this process. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MEASUREMENT_FOREGROUND_MS](#MEASUREMENT_FOREGROUND_MS:kotlin.Int) Key for a measurement of the number of milliseconds this process spent with an activity in the foreground. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MEASUREMENT_STARTS_COUNT](#MEASUREMENT_STARTS_COUNT:kotlin.Int) Key for a measurement of the number of times this process was started for any reason. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MEASUREMENT_SYSTEM_TIME_MS](#MEASUREMENT_SYSTEM_TIME_MS:kotlin.Int) Key for a measurement of number of millseconds the CPU spent running in kernel space for this process. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MEASUREMENT_USER_TIME_MS](#MEASUREMENT_USER_TIME_MS:kotlin.Int) Key for a measurement of number of millseconds the CPU spent running in user space for this process. |\n\nConstants\n---------\n\n### MEASUREMENT_ANR_COUNT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASUREMENT_ANR_COUNT: Int\n```\n\nKey for a measurement of the number of ANRs that happened in this process. \n\n Value: 30005\n\n### MEASUREMENT_CRASHES_COUNT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASUREMENT_CRASHES_COUNT: Int\n```\n\nKey for a measurement of the number of crashes that happened in this process. \n\n Value: 30004\n\n### MEASUREMENT_FOREGROUND_MS\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASUREMENT_FOREGROUND_MS: Int\n```\n\nKey for a measurement of the number of milliseconds this process spent with an activity in the foreground. \n\n Value: 30006\n\n### MEASUREMENT_STARTS_COUNT\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASUREMENT_STARTS_COUNT: Int\n```\n\nKey for a measurement of the number of times this process was started for any reason. \n\n Value: 30003\n\n### MEASUREMENT_SYSTEM_TIME_MS\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASUREMENT_SYSTEM_TIME_MS: Int\n```\n\nKey for a measurement of number of millseconds the CPU spent running in kernel space for this process. \n\n Value: 30002\n\n### MEASUREMENT_USER_TIME_MS\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MEASUREMENT_USER_TIME_MS: Int\n```\n\nKey for a measurement of number of millseconds the CPU spent running in user space for this process. \n\n Value: 30001"]]