Skip to content

Instantly share code, notes, and snippets.

@jkubrynski
Last active December 19, 2015 17:59
Show Gist options
  • Save jkubrynski/5995874 to your computer and use it in GitHub Desktop.
Save jkubrynski/5995874 to your computer and use it in GitHub Desktop.
CaliperResultParser
class CaliperResultParser {
public static void main(String[] args) {
def slurper = new JsonSlurper()
def json = slurper.parseText(new File(args[0]).getText())
json.each {
println it.scenario.benchmarkSpec.methodName + ' = ' + it.measurements.collect {
row -> row.value.magnitude / row.weight
}.sum() / it.measurements.size
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment