NativeBenchmarkTest

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 原生基准测试模块。

公共构造函数

NativeBenchmarkTest

public NativeBenchmarkTest ()

公共方法

getDevice

public ITestDevice getDevice ()

获取被测设备。

返回
ITestDevice ITestDevice

getModuleName

public String getModuleName ()

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

返回
String 要运行的原生测试模块的名称,如果未设置,则为 null

得分

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

运行测试并向监听器报告结果。

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

listener ITestInvocationListener:测试结果的 ITestInvocationListener

抛出
DeviceNotAvailableException

setDevice

public void setDevice (ITestDevice device)

注入被测设备。

参数
device ITestDevice:要使用的 ITestDevice

setModuleName

public void setModuleName (String moduleName)

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

参数
moduleName String:要运行的原生测试模块的名称