GoogleBenchmarkResultParser

public class GoogleBenchmarkResultParser
extends Object

java.lang.Object
   ↳ com.android.tradefed.testtype.GoogleBenchmarkResultParser


剖析從殼層執行的 Google Benchmark 結果,並傳回包含所有結果的對照表。

摘要

公用建構函式

GoogleBenchmarkResultParser(String testClassName, ITestInvocationListener listener)

公用方法

parse(CommandResult cmd_result)

剖析個別輸出行。

受保護的方法

parseJsonToMap(JSONObject j)

輔助程式會遍歷所有 JSON 鍵,並將這些鍵與相符的值放入對應的對照表。

公用建構函式

GoogleBenchmarkResultParser

public GoogleBenchmarkResultParser (String testClassName, 
                ITestInvocationListener listener)

參數
testClassName String

listener ITestInvocationListener

公用方法

parse

public  parse (CommandResult cmd_result)

剖析個別輸出行。name,iterations,real_time,cpu_time,time_unit,bytes_per_second,items_per_second,label, error_occurred,error_message

參數
cmd_result CommandResult:包含測試輸出的裝置指令結果

傳回
包含已執行測試數量的對應項目。

受保護的方法

parseJsonToMap

protected  parseJsonToMap (JSONObject j)

輔助程式會遍歷所有 JSON 鍵,並將這些鍵與相符的值放入對應的對應項目中。

參數
j JSONObject

傳回

擲回
JSONException