Gatling Exporter :: Core

A plugin-based maven mojo to extract Gatling data

License

License

Categories

Categories

Gatling Application Testing & Monitoring
GroupId

GroupId

de.drippinger.gatling
ArtifactId

ArtifactId

gatling-reporter-core
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Gatling Exporter :: Core
A plugin-based maven mojo to extract Gatling data

Download gatling-reporter-core

How to add to project

<!-- https://jarcasting.com/artifacts/de.drippinger.gatling/gatling-reporter-core/ -->
<dependency>
    <groupId>de.drippinger.gatling</groupId>
    <artifactId>gatling-reporter-core</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/de.drippinger.gatling/gatling-reporter-core/
implementation 'de.drippinger.gatling:gatling-reporter-core:0.1'
// https://jarcasting.com/artifacts/de.drippinger.gatling/gatling-reporter-core/
implementation ("de.drippinger.gatling:gatling-reporter-core:0.1")
'de.drippinger.gatling:gatling-reporter-core:jar:0.1'
<dependency org="de.drippinger.gatling" name="gatling-reporter-core" rev="0.1">
  <artifact name="gatling-reporter-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.drippinger.gatling', module='gatling-reporter-core', version='0.1')
)
libraryDependencies += "de.drippinger.gatling" % "gatling-reporter-core" % "0.1"
[de.drippinger.gatling/gatling-reporter-core "0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
commons-io : commons-io jar 1.3.2
net.quux00.simplecsv : simplecsv jar 2.0
org.apache.commons : commons-math3 jar 3.0

test (2)

Group / Artifact Type Version
org.assertj : assertj-core jar 3.15.0
org.junit.jupiter : junit-jupiter jar 5.6.2

Project Modules

There are no modules declared in this project.

Gatling-Reporter

Java CI with Maven

Gatling Reporter is a maven plugin that parses the Gatling simulation.log file and transforms it into reportable data. You get basically the same data as from an HTML report, but can export the data into a persistent data storage that allows you to calculate trends and reports over time.

This lib is a fork of gatling-report.

Motivation

Gatling creates great reports that visualize the answer times under various load scenarios. These reports are helpful, but usually, one wants to compare them to previous results. Unfortunately, to compare them, there exist many competing approaches to storing such data: Graphite, Prometheus, DynamoDB, MongoDB, RDMS product x, or flat files. And this is just saving the data, visualize them may also be a challenge.

The assumption of this plugin is, writing a Plugin that fits all use cases is futile. The intention is to have a plugin that prepares a raw overview and then allows developers to write custom additions via a ServiceLoader approach. These can then communicate with whatever DB or service used within an organization.

Usage

<plugins>
    <plugin>
        <groupId>io.gatling</groupId>
        <artifactId>gatling-maven-plugin</artifactId>
        <version>${gatling-maven-plugin.version}</version>
    </plugin>

    <plugin>
        <groupId>de.drippinger.gatling</groupId>
        <artifactId>gatling-reporter</artifactId>
        <version>0.1</version>
        <dependencies>
            <!-- Example -->
            <dependency>
                <groupId>de.drippinger.gatling</groupId>
                <artifactId>gatling-reporter-csv-exporter</artifactId>
                <version>0.1</version>
            </dependency>
        </dependencies>
    </plugin>

</plugins>

The plugin itself only calculates the SimulationContext, additional dependencies that use a ServiceLoader can then extend the plugin and bring their dependencies. For example, see the CsvExporter.

public class CsvExporter implements Exporter {

    @Override
    public void publish(ExporterProperties properties, Consumer<String> infoLogger) {

        for (SimulationContext simulationContext : properties.getSimulations()) {
            try (FileWriter writer = writer(properties, simulationContext)) {
                writer.write(simulationContext.toString());

                infoLogger.accept("Wrote to " + filePath(properties, simulationContext));
            } catch (IOException e) {
                throw new ExporterException("Could not write CSV Report", e);
            }

        }
    }
    // [...]

}

To create your own Exporter create a new project or module within your project with one class like the one above. This module needs to be available in your local .m2 folder or within your organisations nexus or alike.

Versions

Version
0.1