import groovy.json.JsonSlurper
import org.gradle.api.*

/**
 * Utility for printing benchmark results.
 * Results can be obtained with JMH flags
 * -rf json -rff serialization-benchmark-results.json
 */
class PrintBenchmarksTask extends DefaultTask {
    private String fileName = "serialization-benchmark-results.json"

    @TaskAction
    def printBenchmarkJsonAsTeamcityStats() {
        File jsonFile = project.file(fileName)
        if (!jsonFile.exists()) throw new TaskExecutionException(this, new FileNotFoundException("File $fileName not found"))
        def parsedJson = new JsonSlurper().parseText(jsonFile.text)

        parsedJson.each { v ->
            def name = (v.benchmark - "kotlinx.benchmarks.")
            def score = v.primaryMetric.score
            println("##teamcity[buildStatisticValue key='" + name + "' value='" + score + "']")
        }
    }
}

rootProject.tasks.register("printBenchmarksJsonAsTeamcityStats", PrintBenchmarksTask)
