本地基准测试

public class NativeBenchmarkTest
extends Object implements IDeviceTest , IRemoteTest

java.lang.Object
com.android.tradefed.testtype.NativeBenchmarkTest


在给定设备上运行本机基准测试可执行文件的测试。

它使用NativeBenchmarkTestParser来解析平均操作时间与操作之间的延迟,这些结果将结果传递给ITestInvocationListener

概括

公共构造函数

NativeBenchmarkTest ()

公共方法

ITestDevice getDevice ()

获取待测设备。

String getModuleName ()

获取 Android 原生基准测试模块运行。

void run ( TestInformation testInfo, ITestInvocationListener listener)

运行测试,并将结果报告给侦听器。

void setDevice ( ITestDevice device)

注入被测设备。

void setModuleName (String moduleName)

设置 Android 原生基准测试模块运行。

公共构造函数

本地基准测试

public NativeBenchmarkTest ()

公共方法

获取设备

public ITestDevice getDevice ()

获取待测设备。

退货
ITestDevice ITestDevice

获取模块名称

public String getModuleName ()

获取 Android 原生基准测试模块运行。

退货
String要运行的本机测试模块的名称,如果未设置则为 null

跑步

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

运行测试,并将结果报告给侦听器。

参数
testInfo TestInformation :包含运行测试的有用信息的TestInformation对象。

listener ITestInvocationListener : 测试结果的ITestInvocationListener

投掷
DeviceNotAvailableException

设置设备

public void setDevice (ITestDevice device)

注入被测设备。

参数
device ITestDevice :要使用的ITestDevice

设置模块名称

public void setModuleName (String moduleName)

设置 Android 原生基准测试模块运行。

参数
moduleName String : 要运行的本机测试模块的名称