Google 致力于为黑人社区推动种族平等。查看具体举措

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