# ProcessHealthStats

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/os/health/ProcessHealthStats#constants)\|[Inherited Methods](https://developer.android.com/reference/android/os/health/ProcessHealthStats#inhmethods)  

# ProcessHealthStats

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/os/health/ProcessHealthStats "View this page in Kotlin")\|Java

`
public

final

class
ProcessHealthStats
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|--------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.os.health.ProcessHealthStats |

<br />

*** ** * ** ***

Keys for[HealthStats](https://developer.android.com/reference/android/os/health/HealthStats)returned from[HealthStats.getStats(int)](https://developer.android.com/reference/android/os/health/HealthStats#getStats(int))with the[UidHealthStats.STATS_PROCESSES](https://developer.android.com/reference/android/os/health/UidHealthStats#STATS_PROCESSES)key.

## Summary

|                                                                                                                     ### Constants                                                                                                                     ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [MEASUREMENT_ANR_COUNT](https://developer.android.com/reference/android/os/health/ProcessHealthStats#MEASUREMENT_ANR_COUNT) Key for a measurement of the number of ANRs that happened in this process.                                         |
| `int` | [MEASUREMENT_CRASHES_COUNT](https://developer.android.com/reference/android/os/health/ProcessHealthStats#MEASUREMENT_CRASHES_COUNT) Key for a measurement of the number of crashes that happened in this process.                              |
| `int` | [MEASUREMENT_FOREGROUND_MS](https://developer.android.com/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. |
| `int` | [MEASUREMENT_STARTS_COUNT](https://developer.android.com/reference/android/os/health/ProcessHealthStats#MEASUREMENT_STARTS_COUNT) Key for a measurement of the number of times this process was started for any reason.                        |
| `int` | [MEASUREMENT_SYSTEM_TIME_MS](https://developer.android.com/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.   |
| `int` | [MEASUREMENT_USER_TIME_MS](https://developer.android.com/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.         |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/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](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/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](https://developer.android.com/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](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### MEASUREMENT_ANR_COUNT

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int MEASUREMENT_ANR_COUNT
```

Key for a measurement of the number of ANRs that happened in this process.

<br />

Constant Value: 30005 (0x00007535)  

### MEASUREMENT_CRASHES_COUNT

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int MEASUREMENT_CRASHES_COUNT
```

Key for a measurement of the number of crashes that happened in this process.

<br />

Constant Value: 30004 (0x00007534)  

### MEASUREMENT_FOREGROUND_MS

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
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.

<br />

Constant Value: 30006 (0x00007536)  

### MEASUREMENT_STARTS_COUNT

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int MEASUREMENT_STARTS_COUNT
```

Key for a measurement of the number of times this process was started for any reason.

<br />

Constant Value: 30003 (0x00007533)  

### MEASUREMENT_SYSTEM_TIME_MS

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
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.

<br />

Constant Value: 30002 (0x00007532)  

### MEASUREMENT_USER_TIME_MS

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
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.

<br />

Constant Value: 30001 (0x00007531)