Commit c59de216 authored by Noric Couderc's avatar Noric Couderc

Opti: Make use of efficient data loading in naive classifier

Uses a more efficient function to load CSV data.
parent 26111a36
......@@ -4,7 +4,6 @@ import org.apache.commons.csv.CSVFormat
import org.apache.commons.csv.CSVPrinter
* Naive classifier for suggesting collections
......@@ -20,9 +19,12 @@ class NaiveClassifier(reader : Reader, writer : Writer) {
fun classifyFromReader(tsv : Boolean) {
val loader = TraceLoader()
System.out.println("Reading traces...")
val traces = loader.readCsvDataEfficient(reader, tsv)
System.out.println("Removing duplicates...")
val tracesCleaned = loader.removeDuplicates(traces)
System.out.println("Generating benchmarks...")
val data = loader.benchmarksFromTraces(
loader.removeDuplicates(loader.readCsvData(reader, tsv)))
val data = loader.benchmarksFromTraces(tracesCleaned)
System.out.println("Generating benchmarks: done.")
val results = TraceBenchmarkRunner().getSuggestions(data!!).toList()
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