NativeBenchmarkTestParser

public class NativeBenchmarkTestParser
extends MultiLineReceiver

java.lang.Object
   ↳ com.android.ddmlib.MultiLineReceiver
     ↳ com.android.tradefed.testtype.NativeBenchmarkTestParser


一种 IShellOutputReceiver,用于解析基准测试数据输出,收集每次操作的平均时间方面的指标。

查找以下输出

Time per iteration min: X avg: Y max: Z

摘要

公共构造函数

NativeBenchmarkTestParser(String runName)

创建 NativeBenchmarkTestParser

公共方法

double getAvgOperationTime()
double getMaxOperationTime()
double getMinOperationTime()
String getRunName()
boolean isCancelled()

void processNewLines(String[] lines)

当远程进程接收到新行时调用。

公共构造函数

NativeBenchmarkTestParser

public NativeBenchmarkTestParser (String runName)

创建 NativeBenchmarkTestParser

参数
runName String:运行名称。用于日志记录。

公共方法

getAvgOperationTime

public double getAvgOperationTime ()

返回
double 平均操作时间

getMaxOperationTime

public double getMaxOperationTime ()

返回
double 最长运行时间

getMinOperationTime

public double getMinOperationTime ()

返回
double 最低运行时间

getRunName

public String getRunName ()

返回
String 测试运行的名称。

isCancelled

public boolean isCancelled ()

返回
boolean

processNewLines

public void processNewLines (String[] lines)

当远程进程接收到新行时调用。

可以保证,当向此方法提供行时,这些行是完整的。

参数
lines String:包含新行的数组。