原生基准测试

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 TestInformationTestInformation对象包含运行测试的有用信息。

listener ITestInvocationListener :测试结果的ITestInvocationListener

投掷
DeviceNotAvailableException

设置设备

public void setDevice (ITestDevice device)

注入被测设备。

参数
device ITestDevice :要使用的ITestDevice

设置模块名称

public void setModuleName (String moduleName)

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

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