-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude the Highcharts dependency and provide a minimal replacement
Relates to #809 Signed-off-by: Alexander Schwartz <[email protected]>
- Loading branch information
Showing
9 changed files
with
104 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
benchmark/src/main/java/org/keycloak/benchmark/gatling/chart/ComponentDummy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.keycloak.benchmark.gatling.chart; | ||
|
||
import io.gatling.charts.component.Component; | ||
import scala.collection.immutable.Seq; | ||
import scala.jdk.javaapi.CollectionConverters; | ||
|
||
import java.util.Collections; | ||
|
||
/** | ||
* This is a dummy component which will show up as empty in Gatling's HTML report. | ||
* It is a minimal replacement for the Highcharts library which is excluded for licensing restrictions. | ||
* @author Alexander Schwartz | ||
*/ | ||
public class ComponentDummy implements Component { | ||
@Override | ||
public String html() { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public String js() { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public Seq<String> jsFiles() { | ||
return CollectionConverters.asScala(Collections.<String>emptyIterator()).toSeq(); | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
benchmark/src/main/java/org/keycloak/benchmark/gatling/chart/ComponentLibraryDummy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package org.keycloak.benchmark.gatling.chart; | ||
|
||
import io.gatling.charts.component.Component; | ||
import io.gatling.charts.component.ComponentLibrary; | ||
import io.gatling.charts.stats.CountsVsTimePlot; | ||
import io.gatling.charts.stats.IntVsTimePlot; | ||
import io.gatling.charts.stats.PercentVsTimePlot; | ||
import io.gatling.charts.stats.PercentilesVsTimePlot; | ||
import io.gatling.charts.stats.PieSlice; | ||
import io.gatling.charts.stats.Series; | ||
import scala.collection.immutable.Seq; | ||
|
||
/** | ||
* This is a dummy component which will show up as empty in Gatling's HTML report. | ||
* It is a minimal replacement for the Highcharts library which is excluded for licensing restrictions. | ||
* | ||
* @author Alexander Schwartz | ||
*/ | ||
public class ComponentLibraryDummy implements ComponentLibrary { | ||
@Override | ||
public String getAllUsersJs(long runStart, Series<IntVsTimePlot> series) { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public Component getActiveSessionsComponent(long runStart, Seq<Series<IntVsTimePlot>> series) { | ||
return new ComponentDummy(); | ||
} | ||
|
||
@Override | ||
public Component getRangesComponent(String chartTitle, String eventName, boolean large) { | ||
return new ComponentDummy(); | ||
} | ||
|
||
@Override | ||
public Component getRequestCountPolarComponent() { | ||
return new ComponentDummy(); | ||
} | ||
|
||
@Override | ||
public Component getDistributionComponent(String title, String yAxisName, Series<PercentVsTimePlot> durationsSuccess, Series<PercentVsTimePlot> durationsFailure) { | ||
return new ComponentDummy(); | ||
} | ||
|
||
@Override | ||
public Component getPercentilesOverTimeComponent(String yAxisName, long runStart, Series<PercentilesVsTimePlot> successSeries) { | ||
return new ComponentDummy(); | ||
} | ||
|
||
@Override | ||
public Component getRequestsComponent(long runStart, Series<CountsVsTimePlot> counts, Series<PieSlice> pieSeries) { | ||
return new ComponentDummy(); | ||
} | ||
|
||
@Override | ||
public Component getResponsesComponent(long runStart, Series<CountsVsTimePlot> counts, Series<PieSlice> pieSeries) { | ||
return new ComponentDummy(); | ||
} | ||
|
||
@Override | ||
public Component getResponseTimeScatterComponent(Series<IntVsTimePlot> successData, Series<IntVsTimePlot> failuresData) { | ||
return new ComponentDummy(); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
benchmark/src/main/resources/META-INF/services/io.gatling.charts.component.ComponentLibrary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.keycloak.benchmark.gatling.chart.ComponentLibraryDummy |
Binary file not shown.
Binary file removed
BIN
-43 KB
doc/benchmark/modules/ROOT/images/report/custom-report/report-header.png
Binary file not shown.
Binary file modified
BIN
-37.8 KB
(57%)
doc/benchmark/modules/ROOT/images/report/gatling-standard-report/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-95 KB
...mages/report/gatling-standard-report/response-times-and-requests-per-second.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters