GoogleBenchmarkResultParser

public class GoogleBenchmarkResultParser
extends Object

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


剖析從殼層執行的 Google 基準化結果,並傳回包含所有結果的地圖。

摘要

公用建構函式

GoogleBenchmarkResultParser(String testClassName, ITestInvocationListener listener)

公用方法

Map<String, String> parse(CommandResult cmd_result)

剖析個別輸出行。

受保護的方法

Map<String, String> parseJsonToMap(JSONObject j)

Helper that go over all json keys and put them in a map with their matching value.

公用建構函式

GoogleBenchmarkResultParser

public GoogleBenchmarkResultParser (String testClassName, 
                ITestInvocationListener listener)

參數
testClassName String

listener ITestInvocationListener

公用方法

parse

public Map<String, String> 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:包含測試輸出的裝置指令結果

傳回
Map<String, String> 包含執行測試次數的地圖。

受保護的方法

parseJsonToMap

protected Map<String, String> parseJsonToMap (JSONObject j)

這個輔助程式會檢查所有 JSON 鍵,並將這些鍵及其相符的值放入對應中。

參數
j JSONObject

傳回
Map<String, String>

擲回
JSONException