# PidHealthStats

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/PidHealthStats#constants)\|[Inherited Methods](https://developer.android.com/reference/android/os/health/PidHealthStats#inhmethods)  

# PidHealthStats

*** ** * ** ***

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

`
public

final

class
PidHealthStats
`  
`

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


``


`

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

<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_PIDS](https://developer.android.com/reference/android/os/health/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

|                                                                                                                                                                        ### Constants                                                                                                                                                                         ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [MEASUREMENT_WAKE_NESTING_COUNT](https://developer.android.com/reference/android/os/health/PidHealthStats#MEASUREMENT_WAKE_NESTING_COUNT) Key for a measurement of the current nesting depth of wakelocks for this process.                                                                                                                           |
| `int` | [MEASUREMENT_WAKE_START_MS](https://developer.android.com/reference/android/os/health/PidHealthStats#MEASUREMENT_WAKE_START_MS) Key for a measurement of the time in the[SystemClock.elapsedRealtime()](https://developer.android.com/reference/android/os/SystemClock#elapsedRealtime())timebase that a wakelock was first acquired in this process. |
| `int` | [MEASUREMENT_WAKE_SUM_MS](https://developer.android.com/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.                                                                                                                         |

| ### 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_WAKE_NESTING_COUNT

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

```
public static final int MEASUREMENT_WAKE_NESTING_COUNT
```

Key for a measurement of the current nesting depth of wakelocks for this process. That is to say, the number of times a nested wakelock has been started but not stopped. A high number here indicates an improperly paired wakelock acquire/release combination.

More details on the individual wake locks is available by getting the[UidHealthStats.TIMERS_WAKELOCKS_FULL](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_FULL),[UidHealthStats.TIMERS_WAKELOCKS_PARTIAL](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_PARTIAL),[UidHealthStats.TIMERS_WAKELOCKS_WINDOW](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_WINDOW)and[UidHealthStats.TIMERS_WAKELOCKS_DRAW](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_DRAW)keys.

<br />

Constant Value: 20001 (0x00004e21)  

### MEASUREMENT_WAKE_START_MS

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

```
public static final int MEASUREMENT_WAKE_START_MS
```

Key for a measurement of the time in the[SystemClock.elapsedRealtime()](https://developer.android.com/reference/android/os/SystemClock#elapsedRealtime())timebase that a wakelock was first acquired in this process.

More details on the individual wake locks is available by getting the[UidHealthStats.TIMERS_WAKELOCKS_FULL](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_FULL),[UidHealthStats.TIMERS_WAKELOCKS_PARTIAL](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_PARTIAL),[UidHealthStats.TIMERS_WAKELOCKS_WINDOW](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_WINDOW)and[UidHealthStats.TIMERS_WAKELOCKS_DRAW](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_DRAW)keys.

<br />

Constant Value: 20003 (0x00004e23)  

### MEASUREMENT_WAKE_SUM_MS

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

```
public static final int MEASUREMENT_WAKE_SUM_MS
```

Key for a measurement of the total number of milleseconds that this process has held a wake lock.

More details on the individual wake locks is available by getting the[UidHealthStats.TIMERS_WAKELOCKS_FULL](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_FULL),[UidHealthStats.TIMERS_WAKELOCKS_PARTIAL](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_PARTIAL),[UidHealthStats.TIMERS_WAKELOCKS_WINDOW](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_WINDOW)and[UidHealthStats.TIMERS_WAKELOCKS_DRAW](https://developer.android.com/reference/android/os/health/UidHealthStats#TIMERS_WAKELOCKS_DRAW)keys.

<br />

Constant Value: 20002 (0x00004e22)