kpi: Put score graphs in their own section.

These are higher priority and should be separate from the other
data graphs.
This commit is contained in:
Ben Greear
2020-05-04 06:05:45 -07:00
parent 05c0b99d4f
commit b60b1f4265
2 changed files with 32 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ public class kpi {
static final String out_sep = "\t";
static final String in_sep = "\t";
public static int PRIORITY_IDX = 6;
public static int TEST_ID_IDX = 7;
public static int SHORT_DESC_IDX = 8;
public static int NUMERIC_SCORE_IDX = 10;
@@ -202,6 +203,7 @@ public class kpi {
}
}
StringBuffer scores = new StringBuffer();
StringBuffer plots = new StringBuffer();
StringBuffer groups = new StringBuffer();
StringBuffer runs_rows = new StringBuffer();
@@ -272,8 +274,12 @@ public class kpi {
hk_str = "<a href=\"" + last.getName() + "/" + hk + "/index.html\">" + hk + "</a>";
}
plots.append("<tr><td>" + hk_str + "</td><td>" + title + "</td><td><a href=\"" + npng + "\"><img src=\"" + npngt + "\"></a></td></tr>\n");
if (csv.getPriority() >= 100) {
scores.append("<tr><td>" + hk_str + "</td><td>" + title + "</td><td><a href=\"" + npng + "\"><img src=\"" + npngt + "\"></a></td></tr>\n");
}
else {
plots.append("<tr><td>" + hk_str + "</td><td>" + title + "</td><td><a href=\"" + npng + "\"><img src=\"" + npngt + "\"></a></td></tr>\n");
}
}
catch (Exception ee) {
ee.printStackTrace();
@@ -416,7 +422,7 @@ public class kpi {
}
}
if (needs_tr && pngs.length() > 0) {
if ((!needs_tr) && pngs.length() > 0) {
pngs.append("</tr>\n");
}
}
@@ -448,6 +454,7 @@ public class kpi {
String line;
while ((line = br.readLine()) != null) {
line = line.replace("___TITLE___", test_bed + " Report History");
line = line.replace("___SCORE_RUNS___", scores.toString());
line = line.replace("___GROUP_GRAPHS___", groups.toString());
line = line.replace("___DATA_GRAPHS___", plots.toString());
line = line.replace("___TEST_RUNS___", runs_rows.toString());
@@ -480,6 +487,7 @@ class HistRow {
String title = "";
String units = "";
String graph_group = "";
int prio = 0;
StringBuffer csv = new StringBuffer();
public HistRow(Row r) {
@@ -487,6 +495,11 @@ class HistRow {
title = r.getShortDesc();
units = r.getUnits();
graph_group = r.getGraphGroup();
prio = r.getPriority();
}
int getPriority() {
return prio;
}
String getFname() {
@@ -564,6 +577,15 @@ class Row {
}
}
int getPriority() {
try {
return Long.valueOf(rdata.elementAt(kpi.PRIORITY_IDX)).intValue();
}
catch (Exception e) {
return 0;
}
}
String getScore() {
return rdata.elementAt(kpi.NUMERIC_SCORE_IDX);
}

View File

@@ -33,6 +33,12 @@ ___LATEST_RUN_PNGS___
</table>
<P>
<h3>Scores and other top-priority test results.</h3>
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
<tr><th>Test ID</th><th>Description</th><th>Plot Thumbnail</th></tr>
___SCORE_RUNS___
</table>
<P>
<h3>Historical graphs for each Data Set Group.</h3>
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
@@ -41,7 +47,7 @@ ___LATEST_RUN_PNGS___
</table>
<P>
<h3>All Individual Test Run Details.</h3>
<h3>Individual Test Run Details for other data sets.</h3>
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
<tr><th>Test ID</th><th>Test Run</th><th>Date</th><th>DUT Hardware</th><th>DUT Sofware</th><th>DUT Model</th></tr>
___TEST_RUNS___