to top
public class

NativeBenchmarkTest

extends Object
implements IDeviceTest IRemoteTest
java.lang.Object
   ↳ com.android.tradefed.testtype.NativeBenchmarkTest

Class Overview

A Test that runs a native benchmark test executable on given device.

It uses NativeBenchmarkTestParser to parse out the average operation time vs delay between operations those results to the ITestInvocationListeners.

Summary

Constants
String AVG_OP_TIME_KEY_PREFIX
String DEFAULT_TEST_PATH
String ITERATION_KEY
Public Constructors
NativeBenchmarkTest()
Public Methods
ITestDevice getDevice()
Get the device under test.
String getModuleName(String moduleName)
Get the Android native benchmark test module to run.
void run(ITestInvocationListener listener)
Runs the tests, and reports result to the listener.
void setDevice(ITestDevice device)
Inject the device under test.
void setModuleName(String moduleName)
Set the Android native benchmark test module to run.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.tradefed.testtype.IDeviceTest
From interface com.android.tradefed.testtype.IRemoteTest

Constants

static final String AVG_OP_TIME_KEY_PREFIX

Constant Value: "avg-operation-time"

static final String DEFAULT_TEST_PATH

Constant Value: "data/nativebenchmark"

static final String ITERATION_KEY

Constant Value: "iterations"

Public Constructors

public NativeBenchmarkTest ()

Public Methods

public ITestDevice getDevice ()

Get the device under test.

Returns

public String getModuleName (String moduleName)

Get the Android native benchmark test module to run.

Returns
  • the name of the native test module to run, or null if not set

public void run (ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
listener the ITestInvocationListener of test results

public void setDevice (ITestDevice device)

Inject the device under test.

Parameters
device the ITestDevice to use

public void setModuleName (String moduleName)

Set the Android native benchmark test module to run.

Parameters
moduleName The name of the native test module to run