SimplePerfStatResultParser

public final class SimplePerfStatResultParser
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.SimplePerfStatResultParser


用于解析 simpleperf 结果的实用程序类。

在实现测试结果接收器时应该很有用

摘要

公共方法

static SimplePerfResult parseRawOutput(String output)

用于解析多行 simpleperf 输出的实用方法

static List<String> parseSingleLine(String line)

用于解析 simpleperf 结果单行的实用方法

公共方法

parseRawOutput

public static SimplePerfResult parseRawOutput (String output)

用于解析多行 simpleperf 输出的实用方法

参数
output String:多行字符串

返回
SimplePerfResult 用于保存 simpleperf 结果信息的 SimplePerfResult 对象

parseSingleLine

public static List<String> parseSingleLine (String line)

用于解析 simpleperf 结果单行的实用程序方法

参数
line String:一行简单的 simpleperf 结果

返回
List<String> 包含信息的字符串列表。如果长度为 0,则不会解析任何输出。如果长度为 1,则为总时间。如果长度为 3,则包含指标(位置 0)、基准(位置 1)和注释(位置 2)