Package io.appium.java_client.android
Interface HasSupportedPerformanceDataType
- All Superinterfaces:
CanRememberExtensionPresence,ExecutesMethod
- All Known Implementing Classes:
AndroidDriver,FlutterAndroidDriver
public interface HasSupportedPerformanceDataType
extends ExecutesMethod, CanRememberExtensionPresence
-
Method Summary
Modifier and TypeMethodDescriptiongetPerformanceData(String packageName, String dataType, int dataReadTimeout) returns the resource usage information of the application.returns the information type of the system state which is supported to read as like cpu, memory, network traffic, and battery.Methods inherited from interface io.appium.java_client.CanRememberExtensionPresence
assertExtensionExists, markExtensionAbsenceMethods inherited from interface io.appium.java_client.ExecutesMethod
execute, execute
-
Method Details
-
getSupportedPerformanceDataTypes
returns the information type of the system state which is supported to read as like cpu, memory, network traffic, and battery.- Returns:
- output - array like below [cpuinfo, batteryinfo, networkinfo, memoryinfo]
-
getPerformanceData
default List<List<Object>> getPerformanceData(String packageName, String dataType, int dataReadTimeout) returns the resource usage information of the application. the resource is one of the system state which means cpu, memory, network traffic, and battery.- Parameters:
packageName- the package name of the applicationdataType- the type of system state which wants to read. It should be one of the supported performance data types, the return value of the function "getSupportedPerformanceDataTypes"dataReadTimeout- the number of attempts to read- Returns:
- table of the performance data, The first line of the table represents the type of data. The remaining lines represent the values of the data. in case of battery info : [[power], [23]] in case of memory info : [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, totalPss, nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]] in case of network info : [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,], [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]] in case of network info : [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600], [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] in case of cpu info : [[user, kernel], [0.9, 1.3]]
-