Debug.GetRuntimeStat(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the value of a particular runtime statistic or null
if no
such runtime statistic exists.
[Android.Runtime.Register("getRuntimeStat", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=23)]
public static string? GetRuntimeStat (string? statName);
[<Android.Runtime.Register("getRuntimeStat", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=23)>]
static member GetRuntimeStat : string -> string
Parameters
- statName
- String
the name of the runtime statistic to look up.
Returns
the value of the specified runtime statistic or null
if the
runtime statistic doesn't exist.
- Attributes
Remarks
Returns the value of a particular runtime statistic or null
if no such runtime statistic exists.
The following table lists the runtime statistics that the runtime supports. All statistics are approximate. Individual allocations may not be immediately reflected in the results. Note runtime statistics may be added or removed in a future API level.
<table> <thead> <tr> <th>Runtime statistic name</th> <th>Meaning</th> <th>Example</th> <th>Supported (API Levels)</th> </tr> </thead> <tbody> <tr> <td>art.gc.gc-count</td> <td>The number of garbage collection runs.</td> <td>164
</td> <td>23</td> </tr> <tr> <td>art.gc.gc-time</td> <td>The total duration of garbage collection runs in ms.</td> <td>62364
</td> <td>23</td> </tr> <tr> <td>art.gc.bytes-allocated</td> <td>The total number of bytes that the application allocated.</td> <td>1463948408
</td> <td>23</td> </tr> <tr> <td>art.gc.bytes-freed</td> <td>The total number of bytes that garbage collection reclaimed.</td> <td>1313493084
</td> <td>23</td> </tr> <tr> <td>art.gc.blocking-gc-count</td> <td>The number of blocking garbage collection runs.</td> <td>2
</td> <td>23</td> </tr> <tr> <td>art.gc.blocking-gc-time</td> <td>The total duration of blocking garbage collection runs in ms.</td> <td>804
</td> <td>23</td> </tr> <tr> <td>art.gc.gc-count-rate-histogram</td> <td>Every 10 seconds, the gc-count-rate is computed as the number of garbage collection runs that have occurred over the last 10 seconds. art.gc.gc-count-rate-histogram is a histogram of the gc-count-rate samples taken since the process began. The histogram can be used to identify instances of high rates of garbage collection runs. For example, a histogram of "0:34503,1:45350,2:11281,3:8088,4:43,5:8" shows that most of the time there are between 0 and 2 garbage collection runs every 10 seconds, but there were 8 distinct 10-second intervals in which 5 garbage collection runs occurred.</td> <td>0:34503,1:45350,2:11281,3:8088,4:43,5:8
</td> <td>23</td> </tr> <tr> <td>art.gc.blocking-gc-count-rate-histogram</td> <td>Every 10 seconds, the blocking-gc-count-rate is computed as the number of blocking garbage collection runs that have occurred over the last 10 seconds. art.gc.blocking-gc-count-rate-histogram is a histogram of the blocking-gc-count-rate samples taken since the process began. The histogram can be used to identify instances of high rates of blocking garbage collection runs. For example, a histogram of "0:99269,1:1,2:1" shows that most of the time there are zero blocking garbage collection runs every 10 seconds, but there was one 10-second interval in which one blocking garbage collection run occurred, and there was one interval in which two blocking garbage collection runs occurred.</td> <td>0:99269,1:1,2:1
</td> <td>23</td> </tr> </tbody> </table>
Java documentation for android.os.Debug.getRuntimeStat(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.