Skip to content

Commit

Permalink
Revert "m"
Browse files Browse the repository at this point in the history
This reverts commit 43af9af.
  • Loading branch information
AbdullinAM committed Aug 26, 2024
1 parent 43af9af commit 1dabd08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,23 +177,15 @@ fun main(args: Array<String>) {
.computeMutationScore(benchmark, testSuite, compilationResult)

allData += String.format(
"%s, %s, %d, %s, %s, %d, %d, %.2f, %d, %d, %.2f, %d, %d, %.2f, %d, %d, %.2f, %s",
"%s, %s, %d, %s, %s, %.2f, %.2f, %.2f, %.2f, %s",
tool,
runName,
iteration,
benchmark.buildId,
benchmark.klass,
coverage.compilationRate.numerator,
coverage.compilationRate.denominator,
coverage.compilationRate.ratio * 100.0,
coverage.coverage.first().lines.covered,
coverage.coverage.first().lines.total,
coverage.coverage.first().lines.ratio * 100.0,
coverage.coverage.first().branches.covered,
coverage.coverage.first().branches.total,
coverage.coverage.first().branches.ratio * 100.0,
mutationScore.numerator,
mutationScore.denominator,
mutationScore.ratio * 100.0,
benchmarkProperties[benchmarkName]?.toList()
?.joinToString(", ") { "${it.first} -> ${it.second}" } ?: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ fun main(args: Array<String>) {
} ?: emptyMap()
val metricsProvider = MetricsProvider(Paths.get("metrics.json"))

val header = "tool,runName,iteration,benchmark buildId,benchmark klass,compiled tests,total tests,compilation rate," +
"covered lines,total lines,line coverage," +
"covered branches,total branches,branch coverage,mutation score,package,internal dependencies,stdlib dependencies," +
"external dependencies,language,comments,java docs,sloc,cyclomatic complexity"
val header = "tool,runName,iteration,benchmark buildId,benchmark klass,compilation rate,line coverage," +
"branch coverage,mutation score,package,internal dependencies,stdlib dependencies,external dependencies," +
"language,comments,java docs,sloc,cyclomatic complexity"
val valueTypes = listOf(
"PrimitiveModel" to PrimitiveModel,
"NullModel" to NullModel,
Expand All @@ -61,16 +60,16 @@ fun main(args: Array<String>) {

val fullHeader = header + "," + valueTypes.joinToString(separator = ",") { it.first }

val newCsv = Paths.get("TestSpark-metrics-gpt4o-300.csv").bufferedWriter().use { writer ->
val newCsv = Paths.get("TestSpark-metrics-llama2-300.csv").bufferedWriter().use { writer ->
writer.write(fullHeader)
writer.write("\n")

for (file in input.listDirectoryEntries().filter { it.name.endsWith(".csv") }) {
val (tool, _, runName, iteration) = file.name.removeSuffix(".csv").split('-')
if (runName != "gpt4o") continue
if (runName != "llama2") continue

for (run in file.readLines()) {
val fixedLine = run.split(", ").take(15).toMutableList()
val fixedLine = run.split(", ").take(9).toMutableList()
if (fixedLine[3] !in benchmarkProperties) {
continue
}
Expand Down

0 comments on commit 1dabd08

Please sign in to comment.