Commit 311ed359 authored by Noric Couderc's avatar Noric Couderc

Optimization: Filtered out duplicate traces

When two traces are from the same allocation site, with the same target
type and the exact same list of methods, we only keep one.
parent fd5d9dd7
......@@ -2,19 +2,15 @@ package se.lth.cs
import org.apache.commons.csv.CSVFormat
import org.apache.commons.csv.CSVParser
import org.apache.commons.csv.CSVRecord
import org.apache.commons.lang3.tuple.ImmutablePair
import se.lth.cs.SyntheticBenchmarkGeneration.ListSyntheticBenchmarkGenerator
import se.lth.cs.SyntheticBenchmarkGeneration.MapSyntheticBenchmarkGenerator
import se.lth.cs.SyntheticBenchmarkGeneration.SetSyntheticBenchmarkGenerator
import java.io.Reader
import se.lth.cs.bcgen.*
import java.io.FileInputStream
import se.lth.cs.bcgen.BCBenchmarkPackage
import java.io.InputStream
import java.io.ObjectInputStream
import java.lang.RuntimeException
import java.io.Reader
import java.util.*
import java.util.stream.Collector
import java.util.stream.Collectors
import java.util.stream.Stream
......@@ -40,7 +36,10 @@ class TraceLoader {
val methods = e.value.sortedBy { it["step"] }
.map { it["method"]!!}
TraceData(location, object_id, target_type, methods)
}.toList().map { it.second }
}.toList().map { it.second }.distinctBy {
Triple(it.location, it.target_type, it.methods)
}
return traces
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment