Skip to content

Commit cdc1d71

Browse files
dwnusbaumtimja
authored andcommitted
Remove ssj dependency and spline trend lines when over 200 tests are shown
1 parent 6690002 commit cdc1d71

File tree

2 files changed

+0
-70
lines changed

2 files changed

+0
-70
lines changed

pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,6 @@
5959
</dependencyManagement>
6060

6161
<dependencies>
62-
<dependency>
63-
<groupId>ca.umontreal.iro.simul</groupId>
64-
<artifactId>ssj</artifactId>
65-
<version>3.3.2</version>
66-
<!-- Dependencies are unused, provided by Jenkins core, have unusual licenses, unclear artifact ownership, and/or are obsolete. We only use SmoothingCubicSpline, which does not require dependencies. -->
67-
<exclusions>
68-
<exclusion>
69-
<groupId>*</groupId>
70-
<artifactId>*</artifactId>
71-
</exclusion>
72-
</exclusions>
73-
</dependency>
7462
<dependency>
7563
<groupId>com.pivovarit</groupId>
7664
<artifactId>parallel-collectors</artifactId>

src/main/java/hudson/tasks/junit/History.java

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import org.kohsuke.accmod.Restricted;
5050
import org.kohsuke.accmod.restrictions.NoExternalUse;
5151
import org.kohsuke.stapler.bind.JavaScriptMethod;
52-
import umontreal.ssj.functionfit.SmoothingCubicSpline;
5352

5453
/**
5554
* History of {@link hudson.tasks.test.TestObject} over time.
@@ -208,16 +207,6 @@ private ObjectNode computeDurationTrendJson(List<HistoryTestResultSummary> histo
208207
0,
209208
0,
210209
roundMul); // "--blue"
211-
createSplineTrend(
212-
series,
213-
history,
214-
lrX,
215-
lrY,
216-
"Smooth of " + durationStr,
217-
"rgba(120, 50, 255, 0.5)",
218-
0,
219-
0,
220-
roundMul); // "--indigo"
221210
}
222211
root.set("series", series);
223212
root.set("domainAxisLabels", domainAxisLabels);
@@ -279,51 +268,6 @@ private void createLinearTrend(
279268
}
280269
}
281270

282-
private void createSplineTrend(
283-
ArrayNode series,
284-
List<HistoryTestResultSummary> history,
285-
double[] lrX,
286-
double[] lrY,
287-
String title,
288-
String color,
289-
int xAxisIndex,
290-
int yAxisIndex,
291-
double roundMul) {
292-
if (history.size() < 200) {
293-
return;
294-
}
295-
double rho = Math.min(1.0, 1.0 / Math.max(1, (history.size() / 2)));
296-
if (rho > 0.75) {
297-
return; // Too close to linear
298-
}
299-
SmoothingCubicSpline scs = new SmoothingCubicSpline(lrX, lrY, 0.001);
300-
ObjectNode lrSeries = MAPPER.createObjectNode();
301-
series.add(lrSeries);
302-
lrSeries.put("name", title);
303-
lrSeries.put("preferScreenOrient", "landscape");
304-
lrSeries.put("type", "line");
305-
lrSeries.put("symbol", "circle");
306-
lrSeries.put("symbolSize", 0);
307-
lrSeries.put("xAxisIndex", xAxisIndex);
308-
lrSeries.put("yAxisIndex", yAxisIndex);
309-
ArrayNode lrData = MAPPER.createArrayNode();
310-
lrSeries.set("data", lrData);
311-
ObjectNode lrStyle = MAPPER.createObjectNode();
312-
lrSeries.set("itemStyle", lrStyle);
313-
lrStyle.put("color", color);
314-
ObjectNode lrAreaStyle = MAPPER.createObjectNode();
315-
lrSeries.set("areaStyle", lrAreaStyle);
316-
lrAreaStyle.put("color", "rgba(0, 0, 0, 0)");
317-
318-
if (roundMul < 10.0) {
319-
roundMul = 10.0;
320-
}
321-
for (int index = 0; index < history.size(); ++index) {
322-
// Use float to reduce JSON size.
323-
lrData.add((float) (Math.round(scs.evaluate(index) * roundMul) / roundMul));
324-
}
325-
}
326-
327271
static boolean EXTRA_GRAPH_MATH_ENABLED =
328272
Boolean.parseBoolean(System.getProperty(History.class.getName() + ".EXTRA_GRAPH_MATH_ENABLED", "true"));
329273

@@ -464,8 +408,6 @@ private ObjectNode computeResultTrendJson(List<HistoryTestResultSummary> history
464408
1,
465409
1,
466410
10.0); // "--dark-blue"
467-
createSplineTrend(
468-
series, history, lrX, lrY, "Smooth of Passed", "rgba(255, 50, 255, 0.5)", 1, 1, 10.0); // "--purple"
469411
}
470412

471413
root.set("series", series);

0 commit comments

Comments
 (0)