diff --git a/gocypher-cybench-client/gocypher-cybench-comparator/src/main/java/com/gocypher/cybench/utils/WebpageGenerator.java b/gocypher-cybench-client/gocypher-cybench-comparator/src/main/java/com/gocypher/cybench/utils/WebpageGenerator.java index 771402d8..952480b2 100644 --- a/gocypher-cybench-client/gocypher-cybench-comparator/src/main/java/com/gocypher/cybench/utils/WebpageGenerator.java +++ b/gocypher-cybench-client/gocypher-cybench-comparator/src/main/java/com/gocypher/cybench/utils/WebpageGenerator.java @@ -43,388 +43,386 @@ import com.gocypher.cybench.services.Requests; public class WebpageGenerator { - private static final Logger log = LoggerFactory.getLogger(WebpageGenerator.class); - - String passed = String.valueOf(CompareBenchmarks.totalPassedBenchmarks); - String failed = String.valueOf(CompareBenchmarks.totalFailedBenchmarks); - String total = String.valueOf(CompareBenchmarks.totalComparedBenchmarks); - String skipped = String.valueOf(CompareBenchmarks.totalSkippedBenchmarks); - - static String version = ""; - static String name = ""; - static String range = ""; - static String scope = ""; - static String method = ""; - static String compareVersion = ""; - static String threshold = ""; - static String percentChangeAllowed = ""; - static String deviationsAllowed = ""; - static String configType = ""; - static String dateTime = ""; - static Charset utf8 = StandardCharsets.UTF_8; - static Map allConfigs; - static ArrayList packageNames; - - public WebpageGenerator() { - // TODO Remove Logs/Prints | Change conditional for class variables to be - // skipped - // Make sure no artifacts are left in other classes from debugging - // Add support/HTML generation for multiple packaged in comparator.yaml - - } - - // for comparator configuration - public static void generatePage() throws IOException, URISyntaxException { - configType = "comparator.yaml"; - WebpageGenerator gen = new WebpageGenerator(); - File tempfile = genTemplateHTML(); - File newHtml = new File("logs/Report-Test-" + getDateTimeForFileName() + ".html"); - String htmlTemp; - - htmlTemp = FileUtils.readFileToString(tempfile, utf8); - - // debug - if (allConfigs == null) { - log.error("Unable to grab configurations from comparator.yaml"); - } else { - changeComparatorConfigs(allConfigs); - changeVersion(); - changeDateTime(); - } - - Class clazz = gen.getClass(); - for (Field field : clazz.getDeclaredFields()) { - try { - if (field.getName() != "utf8" && field.getName() != "allConfigs" && field.getName() != "packageNames") { - htmlTemp = htmlTemp.replace("$" + field.getName(), field.get(gen).toString()); - FileUtils.writeStringToFile(newHtml, htmlTemp, utf8); - } - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - } - - createPassedTable(newHtml); - createFailedTable(newHtml); - createSkippedTable(newHtml); - - FileUtils.write(newHtml, "\n", utf8, true); - log.info("Finished creating HTML report."); - log.info("Generated HTML report can be found at {}", newHtml.getAbsolutePath()); - } - - // for script configuration || props gets passed all the way from - // ComparatorScriptEngine - public static void generatePage(Map props) throws IOException { - configType = "JavaScript"; // TODO: Add actual script name - WebpageGenerator gen = new WebpageGenerator(); - File tempfile = genTemplateHTML(); - File newHtml = new File("logs/" + packageNames.get(0) + "-" + getDateTimeForFileName() + ".html"); - String htmlTemp; - - htmlTemp = FileUtils.readFileToString(tempfile, utf8); - - changeScriptConfigs(props); - changeVersion(); - changeDateTime(); - - Class clazz = gen.getClass(); - for (Field field : clazz.getDeclaredFields()) { - try { - if (field.getName() != "utf8" && field.getName() != "allConfigs") { - htmlTemp = htmlTemp.replace("$" + field.getName(), field.get(gen).toString()); - FileUtils.writeStringToFile(newHtml, htmlTemp, utf8); - } - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - } - createPassedTable(newHtml); - createFailedTable(newHtml); - createSkippedTable(newHtml); - FileUtils.write(newHtml, "\n", utf8, true); - log.info("Finished creating HTML report."); - log.info("Generated HTML report can be found at {}", newHtml.getAbsolutePath()); - } - - private static void createPassedTable(File file) throws IOException { - - if (CompareBenchmarks.totalPassedBenchmarks == 0) { - FileUtils.writeStringToFile(file, - " No tests passed.\n", utf8, true); - } else { - - for (Map.Entry>>> benchmark : CompareBenchmarks.passedBenchmarks - .entrySet()) { - String benchmarkName = benchmark.getKey(); - String fingerprint = Requests.namesToFingerprints.get(benchmarkName); - - Map>> benchVersions = benchmark.getValue(); - for (Map.Entry>> versionEntry : benchVersions.entrySet()) { - String benchVersion = versionEntry.getKey(); - Map> benchData = versionEntry.getValue(); - for (Map.Entry> dataEntry : benchData.entrySet()) { - String benchMode = dataEntry.getKey(); - Map benchmarkData = dataEntry.getValue(); - Double score = (Double) benchmarkData.get(ConfigHandling.BENCHMARK_SCORE); - BigDecimal roundScore = BigDecimal.valueOf(score); - Double compareValue = (Double) benchmarkData.get(Comparisons.CALCULATED_COMPARE_VALUE); - BigDecimal roundCompValue = BigDecimal.valueOf(compareValue); - Double delta = (Double) benchmarkData.get(Comparisons.CALCULATED_DELTA); - Double percentChange = (Double) benchmarkData.get(Comparisons.CALCULATED_PERCENT_CHANGE); - BigDecimal roundPercentChange = BigDecimal.valueOf(percentChange); - Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN); - FileUtils.writeStringToFile(file, "" + fingerprint // - + "" + benchmarkName // - + "" + benchVersion // - + "" + benchMode // - + "" + roundScore // - + "" + roundCompValue // - + "" + delta // - + "" + roundPercentChange // - + "% " + sdFromMean // - + "\n", utf8, true); - } - } - } - FileUtils.writeStringToFile(file, "", utf8, true); - } - } - - private static void createFailedTable(File file) throws IOException { - try { - FileUtils.write(file, - "" - + " " - + " " - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " ", // - utf8, true); - - } catch (IOException e) { - e.printStackTrace(); - } - - if (CompareBenchmarks.totalFailedBenchmarks == 0) { - FileUtils.writeStringToFile(file, - "\n", utf8, true); - } else { - for (Map.Entry>>> benchmark : CompareBenchmarks.failedBenchmarks - .entrySet()) { - String benchmarkName = benchmark.getKey(); - String fingerprint = Requests.namesToFingerprints.get(benchmarkName); - - Map>> benchVersions = benchmark.getValue(); - for (Map.Entry>> versionEntry : benchVersions.entrySet()) { - String benchVersion = versionEntry.getKey(); - Map> benchData = versionEntry.getValue(); - for (Map.Entry> dataEntry : benchData.entrySet()) { - String benchMode = dataEntry.getKey(); - Map benchmarkData = dataEntry.getValue(); - Double score = (Double) benchmarkData.get(ConfigHandling.BENCHMARK_SCORE); - BigDecimal roundScore = BigDecimal.valueOf(score); - Double compareValue = (Double) benchmarkData.get(Comparisons.CALCULATED_COMPARE_VALUE); - BigDecimal roundCompValue = BigDecimal.valueOf(compareValue); - Double delta = (Double) benchmarkData.get(Comparisons.CALCULATED_DELTA); - Double percentChange = (Double) benchmarkData.get(Comparisons.CALCULATED_PERCENT_CHANGE); - BigDecimal roundPercentChange = BigDecimal.valueOf(percentChange); - Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN); - FileUtils.writeStringToFile(file, "\n", utf8, true); - } - } - } - FileUtils.write(file, "\n
Failed Tests
FingerprintNameVersionModeScoreCompare ValueDeltaPercent ChangeSD from Mean
No tests failed.
" + fingerprint // - + "" + benchmarkName // - + "" + benchVersion // - + "" + benchMode // - + "" + roundScore // - + "" + roundCompValue // - + "" + delta // - + "" + roundPercentChange // - + "% " + sdFromMean // - + "

", utf8, true); - } - } - - private static void createSkippedTable(File file) throws IOException { - try { - FileUtils.write(file, - "" - + " " - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " " // - + " ", // - utf8, true); - - } catch (IOException e) { - e.printStackTrace(); - } - if (CompareBenchmarks.totalSkippedBenchmarks == 0) { - FileUtils.writeStringToFile(file, - "\n", utf8, true); - } else { - for (Map.Entry>>> benchmark : CompareBenchmarks.skippedBenchmarks - .entrySet()) { - String benchmarkName = benchmark.getKey(); - String fingerprint = Requests.namesToFingerprints.get(benchmarkName); - - Map>> benchVersions = benchmark.getValue(); - for (Map.Entry>> versionEntry : benchVersions.entrySet()) { - String benchVersion = versionEntry.getKey(); - Map> benchData = versionEntry.getValue(); - for (Map.Entry> dataEntry : benchData.entrySet()) { - String benchMode = dataEntry.getKey(); - Map benchmarkData = dataEntry.getValue(); - Double score = (Double) benchmarkData.get(ConfigHandling.BENCHMARK_SCORE); - BigDecimal roundScore = BigDecimal.valueOf(score); - Double compareValue = (Double) benchmarkData.get(Comparisons.CALCULATED_COMPARE_VALUE); - Double delta = (Double) benchmarkData.get(Comparisons.CALCULATED_DELTA); - Double percentChange = (Double) benchmarkData.get(Comparisons.CALCULATED_PERCENT_CHANGE); - Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN); - String compareVersion = (String) benchmarkData.get(ConfigHandling.COMPARE_VERSION); - FileUtils.writeStringToFile(file, "\n", utf8, true); - } - } - } - } - } - - private static File genTemplateHTML() { - WebpageGenerator gen = new WebpageGenerator(); - InputStream in = gen.getClass().getResourceAsStream("/template.html"); - File tempfile = new File("src/main/tmp/temphtml.tmp"); - String result; - try { - result = IOUtils.toString(in, utf8); - FileUtils.writeStringToFile(tempfile, result, utf8); - in.close(); - return tempfile; - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return tempfile; - - } - - private static String getDateTimeForFileName() { - DateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss"); - Date date = new Date(); - String fileName = df.format(date); - return fileName; - } - - private static void changeVersion() { - List passedNames = new ArrayList<>(); - for (Entry>>> benchmark : CompareBenchmarks.passedBenchmarks - .entrySet()) { - String tempName = benchmark.getKey(); - passedNames.add(tempName); - - } - for (String pName : passedNames) { - String tempFingerprint = Requests.namesToFingerprints.get(pName); - version = Requests.getCurrentVersion(tempFingerprint); - } - } - - private static void changeComparatorConfigs(Map configs) { - String tempString = ""; - String longConfigGet = configs.get("compare.default").toString(); - tempString = longConfigGet.substring(1, longConfigGet.length() - 1); - String[] propsArray = tempString.split(". "); - setConfig(propsArray); - } - - private static void changeScriptConfigs(Map compProps) { - String tempString = ""; - for (Map.Entry entry : compProps.entrySet()) { - if (entry.getKey().equals("MyScript")) { - tempString = entry.getValue().toString(); - } - } - tempString = tempString.substring(1, tempString.length() - 1); - String[] propsArray = tempString.split(", "); - setConfig(propsArray); - } - - private static void setConfig(String[] propsArray) { - for (String pName : propsArray) { - if (pName.contains("method")) { - method = pName.substring(7); - } else if (pName.contains("range")) { - range = pName.substring(6); - } else if (pName.contains("scope")) { - scope = pName.substring(6); - } else if (pName.contains("compareVersion")) { - compareVersion = pName.substring(15); - } else if (pName.contains("threshold")) { - threshold = pName.substring(10); - } else if (pName.contains("percentChangeAllowed")) { - percentChangeAllowed = pName.substring(21); - } else if (pName.contains("deviationsAllowed")) { - deviationsAllowed = pName.substring(18); - } - } - } - - private static void changeDateTime() { - dateTime = ZonedDateTime.now().format(DateTimeFormatter.RFC_1123_DATE_TIME); - } - - public static void sendToWebpageGenerator(Map allConfig, Map packages) { - allConfigs = allConfig; - } - - public static void logInfo(String msg, Object... args) { - log.info(msg, args); - } - - public static void logWarn(String msg, Object... args) { - log.warn(msg, args); - } - - public static void logErr(String msg, Object... args) { - log.error(msg, args); - } - - public static void grabPackageNames(ArrayList packNames) { - Set pkgNames = new HashSet<>(packNames); - packNames.clear(); - packNames.addAll(pkgNames); - packageNames = packNames; - - } + private static final Logger log = LoggerFactory.getLogger(WebpageGenerator.class); + + String passed = String.valueOf(CompareBenchmarks.totalPassedBenchmarks); + String failed = String.valueOf(CompareBenchmarks.totalFailedBenchmarks); + String total = String.valueOf(CompareBenchmarks.totalComparedBenchmarks); + String skipped = String.valueOf(CompareBenchmarks.totalSkippedBenchmarks); + + static String version = ""; + static String name = ""; + static String range = ""; + static String scope = ""; + static String method = ""; + static String compareVersion = ""; + static String threshold = ""; + static String percentChangeAllowed = ""; + static String deviationsAllowed = ""; + static String configType = ""; + static String dateTime = ""; + static Charset utf8 = StandardCharsets.UTF_8; + static Map allConfigs; + static ArrayList packageNames; + static List skippedFields = Arrays.asList("utf8", "allConfigs", "packageNames", "skippedFields"); + + public WebpageGenerator() { + // TODO Remove Logs/Prints | + // Add support/HTML generation for multiple packaged in comparator.yaml + } + + // for comparator configuration + public static void generatePage() throws IOException, URISyntaxException { + configType = "comparator.yaml"; + WebpageGenerator gen = new WebpageGenerator(); + File tempfile = genTemplateHTML(); + File newHtml = new File("logs/" + packageNames.get(0) + "-" + getDateTimeForFileName() + ".html"); + String htmlTemp; + + htmlTemp = FileUtils.readFileToString(tempfile, utf8); + + // debug + if (allConfigs == null) { + log.error("Unable to grab configurations from comparator.yaml"); + } else { + changeComparatorConfigs(allConfigs); + changeVersion(); + changeDateTime(); + } + + Class clazz = gen.getClass(); + for (Field field : clazz.getDeclaredFields()) { + + try { + if (!skippedFields.contains(field.getName())) { + htmlTemp = htmlTemp.replace("$" + field.getName(), field.get(gen).toString()); + FileUtils.writeStringToFile(newHtml, htmlTemp, utf8); + } + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + + createPassedTable(newHtml); + createFailedTable(newHtml); + createSkippedTable(newHtml); + + FileUtils.write(newHtml, "\n", utf8, true); + log.info("Finished creating HTML report."); + log.info("Generated HTML report can be found at {}", newHtml.getAbsolutePath()); + } + + // for script configuration || props gets passed all the way from + // ComparatorScriptEngine + public static void generatePage(Map props) throws IOException { + configType = "JavaScript"; // TODO: Add actual script name + WebpageGenerator gen = new WebpageGenerator(); + File tempfile = genTemplateHTML(); + File newHtml = new File("logs/" + packageNames.get(0) + "-" + getDateTimeForFileName() + ".html"); + String htmlTemp; + + htmlTemp = FileUtils.readFileToString(tempfile, utf8); + + changeScriptConfigs(props); + changeVersion(); + changeDateTime(); + + Class clazz = gen.getClass(); + for (Field field : clazz.getDeclaredFields()) { + try { + if (!skippedFields.contains(field.getName())) { + htmlTemp = htmlTemp.replace("$" + field.getName(), field.get(gen).toString()); + FileUtils.writeStringToFile(newHtml, htmlTemp, utf8); + } + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + createPassedTable(newHtml); + createFailedTable(newHtml); + createSkippedTable(newHtml); + FileUtils.write(newHtml, "\n", utf8, true); + log.info("Finished creating HTML report."); + log.info("Generated HTML report can be found at {}", newHtml.getAbsolutePath()); + } + + private static void createPassedTable(File file) throws IOException { + + if (CompareBenchmarks.totalPassedBenchmarks == 0) { + FileUtils.writeStringToFile(file, + "\n", utf8, true); + } else { + + for (Map.Entry>>> benchmark : CompareBenchmarks.passedBenchmarks + .entrySet()) { + String benchmarkName = benchmark.getKey(); + String fingerprint = Requests.namesToFingerprints.get(benchmarkName); + + Map>> benchVersions = benchmark.getValue(); + for (Map.Entry>> versionEntry : benchVersions.entrySet()) { + String benchVersion = versionEntry.getKey(); + Map> benchData = versionEntry.getValue(); + for (Map.Entry> dataEntry : benchData.entrySet()) { + String benchMode = dataEntry.getKey(); + Map benchmarkData = dataEntry.getValue(); + Double score = (Double) benchmarkData.get(ConfigHandling.BENCHMARK_SCORE); + BigDecimal roundScore = BigDecimal.valueOf(score); + Double compareValue = (Double) benchmarkData.get(Comparisons.CALCULATED_COMPARE_VALUE); + BigDecimal roundCompValue = BigDecimal.valueOf(compareValue); + Double delta = (Double) benchmarkData.get(Comparisons.CALCULATED_DELTA); + Double percentChange = (Double) benchmarkData.get(Comparisons.CALCULATED_PERCENT_CHANGE); + BigDecimal roundPercentChange = BigDecimal.valueOf(percentChange); + Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN); + FileUtils.writeStringToFile(file, "\n", utf8, true); + } + } + } + FileUtils.writeStringToFile(file, "
Skipped Tests
FingerprintNameVersionModeScoreCompare ValueDeltaPercent ChangeSD from Mean
No tests were skipped.
" + fingerprint // - + "" + benchmarkName // - + "" + benchVersion // - + "" + benchMode // - + "" + roundScore // - + "" + compareValue // - + "" + delta // - + "" + percentChange // - + "% " + sdFromMean // - + "
No tests passed.
" + fingerprint // + + "" + benchmarkName // + + "" + benchVersion // + + "" + benchMode // + + "" + roundScore // + + "" + roundCompValue // + + "" + delta // + + "" + roundPercentChange // + + "% " + sdFromMean // + + "
", utf8, true); + } + } + + private static void createFailedTable(File file) throws IOException { + try { + FileUtils.write(file, + "" + + " " + + " " + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " ", // + utf8, true); + + } catch (IOException e) { + e.printStackTrace(); + } + + if (CompareBenchmarks.totalFailedBenchmarks == 0) { + FileUtils.writeStringToFile(file, + "\n", utf8, true); + } else { + for (Map.Entry>>> benchmark : CompareBenchmarks.failedBenchmarks + .entrySet()) { + String benchmarkName = benchmark.getKey(); + String fingerprint = Requests.namesToFingerprints.get(benchmarkName); + + Map>> benchVersions = benchmark.getValue(); + for (Map.Entry>> versionEntry : benchVersions.entrySet()) { + String benchVersion = versionEntry.getKey(); + Map> benchData = versionEntry.getValue(); + for (Map.Entry> dataEntry : benchData.entrySet()) { + String benchMode = dataEntry.getKey(); + Map benchmarkData = dataEntry.getValue(); + Double score = (Double) benchmarkData.get(ConfigHandling.BENCHMARK_SCORE); + BigDecimal roundScore = BigDecimal.valueOf(score); + Double compareValue = (Double) benchmarkData.get(Comparisons.CALCULATED_COMPARE_VALUE); + BigDecimal roundCompValue = BigDecimal.valueOf(compareValue); + Double delta = (Double) benchmarkData.get(Comparisons.CALCULATED_DELTA); + Double percentChange = (Double) benchmarkData.get(Comparisons.CALCULATED_PERCENT_CHANGE); + BigDecimal roundPercentChange = BigDecimal.valueOf(percentChange); + Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN); + FileUtils.writeStringToFile(file, "\n", utf8, true); + } + } + } + FileUtils.write(file, "\n
Failed Tests
FingerprintNameVersionModeScoreCompare ValueDeltaPercent ChangeSD from Mean
No tests failed.
" + fingerprint // + + "" + benchmarkName // + + "" + benchVersion // + + "" + benchMode // + + "" + roundScore // + + "" + roundCompValue // + + "" + delta // + + "" + roundPercentChange // + + "% " + sdFromMean // + + "

", utf8, true); + } + } + + private static void createSkippedTable(File file) throws IOException { + try { + FileUtils.write(file, + "" + + " " + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " " // + + " ", // + utf8, true); + + } catch (IOException e) { + e.printStackTrace(); + } + if (CompareBenchmarks.totalSkippedBenchmarks == 0) { + FileUtils.writeStringToFile(file, + "\n", utf8, true); + } else { + for (Map.Entry>>> benchmark : CompareBenchmarks.skippedBenchmarks + .entrySet()) { + String benchmarkName = benchmark.getKey(); + String fingerprint = Requests.namesToFingerprints.get(benchmarkName); + + Map>> benchVersions = benchmark.getValue(); + for (Map.Entry>> versionEntry : benchVersions.entrySet()) { + String benchVersion = versionEntry.getKey(); + Map> benchData = versionEntry.getValue(); + for (Map.Entry> dataEntry : benchData.entrySet()) { + String benchMode = dataEntry.getKey(); + Map benchmarkData = dataEntry.getValue(); + Double score = (Double) benchmarkData.get(ConfigHandling.BENCHMARK_SCORE); + BigDecimal roundScore = BigDecimal.valueOf(score); + Double compareValue = (Double) benchmarkData.get(Comparisons.CALCULATED_COMPARE_VALUE); + Double delta = (Double) benchmarkData.get(Comparisons.CALCULATED_DELTA); + Double percentChange = (Double) benchmarkData.get(Comparisons.CALCULATED_PERCENT_CHANGE); + Double sdFromMean = (Double) benchmarkData.get(Comparisons.CALCULATED_SD_FROM_MEAN); + String compareVersion = (String) benchmarkData.get(ConfigHandling.COMPARE_VERSION); + FileUtils.writeStringToFile(file, "\n", utf8, true); + } + } + } + } + } + + private static File genTemplateHTML() { + WebpageGenerator gen = new WebpageGenerator(); + InputStream in = gen.getClass().getResourceAsStream("/template.html"); + File tempfile = new File("src/main/tmp/temphtml.tmp"); + String result; + try { + result = IOUtils.toString(in, utf8); + FileUtils.writeStringToFile(tempfile, result, utf8); + in.close(); + return tempfile; + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return tempfile; + + } + + private static String getDateTimeForFileName() { + DateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss"); + Date date = new Date(); + String fileName = df.format(date); + return fileName; + } + + private static void changeVersion() { + List passedNames = new ArrayList<>(); + for (Entry>>> benchmark : CompareBenchmarks.passedBenchmarks + .entrySet()) { + String tempName = benchmark.getKey(); + passedNames.add(tempName); + + } + for (String pName : passedNames) { + String tempFingerprint = Requests.namesToFingerprints.get(pName); + version = Requests.getCurrentVersion(tempFingerprint); + } + } + + private static void changeComparatorConfigs(Map configs) { + String tempString = ""; + String longConfigGet = configs.get("compare.default").toString(); + tempString = longConfigGet.substring(1, longConfigGet.length() - 1); + String[] propsArray = tempString.split(". "); + setConfig(propsArray); + } + + private static void changeScriptConfigs(Map compProps) { + String tempString = ""; + for (Map.Entry entry : compProps.entrySet()) { + if (entry.getKey().equals("MyScript")) { + tempString = entry.getValue().toString(); + } + } + tempString = tempString.substring(1, tempString.length() - 1); + String[] propsArray = tempString.split(", "); + setConfig(propsArray); + } + + private static void setConfig(String[] propsArray) { + for (String pName : propsArray) { + if (pName.contains("method")) { + method = pName.substring(7); + } else if (pName.contains("range")) { + range = pName.substring(6); + } else if (pName.contains("scope")) { + scope = pName.substring(6); + } else if (pName.contains("compareVersion")) { + compareVersion = pName.substring(15); + } else if (pName.contains("threshold")) { + threshold = pName.substring(10); + } else if (pName.contains("percentChangeAllowed")) { + percentChangeAllowed = pName.substring(21); + } else if (pName.contains("deviationsAllowed")) { + deviationsAllowed = pName.substring(18); + } + } + } + + private static void changeDateTime() { + dateTime = ZonedDateTime.now().format(DateTimeFormatter.RFC_1123_DATE_TIME); + } + + public static void sendToWebpageGenerator(Map allConfig, Map packages) { + allConfigs = allConfig; + } + + public static void logInfo(String msg, Object... args) { + log.info(msg, args); + } + + public static void logWarn(String msg, Object... args) { + log.warn(msg, args); + } + + public static void logErr(String msg, Object... args) { + log.error(msg, args); + } + + public static void grabPackageNames(ArrayList packNames) { + Set pkgNames = new HashSet<>(packNames); + packNames.clear(); + packNames.addAll(pkgNames); + packageNames = packNames; + + } } \ No newline at end of file
Skipped Tests
FingerprintNameVersionModeScoreCompare ValueDeltaPercent ChangeSD from Mean
No tests were skipped.
" + fingerprint // + + "" + benchmarkName // + + "" + benchVersion // + + "" + benchMode // + + "" + roundScore // + + "" + compareValue // + + "" + delta // + + "" + percentChange // + + "% " + sdFromMean // + + "