Google is committed to advancing racial equity for Black communities. See how.

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, ITestInvocationListener listener)

Public methods

parse(CollectingOutputReceiver output)

Parse an individual output line.

Protected methods

parseJsonToMap(JSONObject j)

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

Public constructors

GoogleBenchmarkResultParser

public GoogleBenchmarkResultParser (String testClassName, 
                ITestInvocationListener listener)

Parameters
testClassName String

listener ITestInvocationListener

Public methods

parse

public  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
a map containing the number of tests that ran.

Protected methods

parseJsonToMap

protected  parseJsonToMap (JSONObject j)

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

Parameters
j JSONObject

Returns

Throws
JSONException