Github user codymarcel commented on a diff in the pull request: https://github.com/apache/phoenix/pull/115#discussion_r38473654 --- Diff: phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/ResultsComparator.java --- @@ -0,0 +1,353 @@ +package org.apache.phoenix.pherf.util; + +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.TreeMap; + +import org.apache.commons.csv.CSVFormat; +import org.apache.commons.csv.CSVParser; +import org.apache.commons.csv.CSVRecord; +import org.apache.phoenix.pherf.PherfConstants; +import org.apache.phoenix.pherf.result.file.ResultFileDetails; + +/** + * Compare results based on set threshold and render results as Google Charts + */ +public class ResultsComparator { + + private String[] labels; + private final Map<String, DataNode> datanodes = new TreeMap<String, DataNode>(); + private final PherfConstants constants = PherfConstants.create(); + private final String resultDir = constants.getProperty("pherf.default.results.dir"); + private final double threshold = Double.parseDouble(constants.getProperty("pherf.default.comparison.threshold")); + + public ResultsComparator(String labels) { + this.setLabelsAsString(labels); + } + + String[] getLabels() { + return labels; + } + + void setLabels(String[] labels) { + this.labels = labels; + } + + void setLabelsAsString(String labels) { --- End diff -- This is setting as array. Why not just call it setLabels() and let overloading do it's thing?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---