GoogleBenchmarkResultParser

public class GoogleBenchmarkResultParser
extends Object

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


Parses the results of Google Benchmark that run from shell, and return a map with all the results.

Summary

Public constructors

GoogleBenchmarkResultParser(String testClassName, ITestRunListener listener)

Public methods

Map<String, String> parse(CollectingOutputReceiver output)

Parse an individual output line.

Protected methods

Map<String, String> parseJsonToMap(JSONObject j)

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

Public constructors

GoogleBenchmarkResultParser

GoogleBenchmarkResultParser (String testClassName, 
                ITestRunListener listener)

Parameters
testClassName String

listener ITestRunListener

Public methods

parse

Map<String, String> parse (CollectingOutputReceiver output)

Parse an individual output line. name,iterations,real_time,cpu_time,bytes_per_second,items_per_second,label

Parameters
output CollectingOutputReceiver: contains the test output

Returns
Map<String, String> a map containing the number of tests that ran.

Protected methods

parseJsonToMap

Map<String, String> parseJsonToMap (JSONObject j)

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

Parameters
j JSONObject

Returns
Map<String, String>

Throws
JSONException