-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
840b615
commit 4e75600
Showing
17 changed files
with
2,342 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#### Graphite | ||
|
||
In a similar fashion to InfluxDB, you can use Graphite and Grafana. Here is an example test plan using the `graphiteListener`: | ||
|
||
```java | ||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static us.abstracta.jmeter.javadsl.JmeterDsl.*; | ||
|
||
import java.io.IOException; | ||
import java.time.Duration; | ||
import org.junit.jupiter.api.Test; | ||
import us.abstracta.jmeter.javadsl.core.TestPlanStats; | ||
|
||
public class PerformanceTest { | ||
|
||
@Test | ||
public void testPerformance() throws IOException { | ||
TestPlanStats stats = testPlan( | ||
threadGroup(2, 10, | ||
httpSampler("http://my.service") | ||
), | ||
graphiteListener("localhost:2004") | ||
).run(); | ||
assertThat(stats.overall().sampleTimePercentile99()).isLessThan(Duration.ofSeconds(5)); | ||
} | ||
|
||
} | ||
``` | ||
|
||
As in the InfluxDB scenario, you can try it locally by running `docker-compose up` (previously [installing Docker](https://docs.docker.com/get-docker/) in your machine) inside [this directory](/docs/guide/reporting/real-time/graphite). After containers are started, you can follow the same steps as in the InfluxDB scenario. | ||
|
||
::: warning | ||
Use the provided `docker-compose` settings for local tests only. It uses weak credentials and is not properly configured for production purposes. | ||
::: | ||
|
||
::: warning | ||
`graphiteListener` is configured to use Pickle Protocol, and port 2004, by default. This is more efficient than text plain protocol, which is the one used by default by JMeter. | ||
::: |
28 changes: 28 additions & 0 deletions
28
docs/guide/reporting/real-time/graphite/docker-compose.yml
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,28 @@ | ||
version: '3' | ||
services: | ||
graphite: | ||
image: graphiteapp/graphite-statsd:1.1.10-5 | ||
ports: | ||
- '2003:2003' | ||
- '2004:2004' | ||
- '8080:80' | ||
volumes: | ||
- ./graphite-conf/carbon.conf:/opt/graphite/conf/carbon.conf | ||
- ./graphite-conf/storage-schemas.conf:/opt/graphite/conf/storage-schemas.conf | ||
- graphite-data:/opt/graphite/storage/whisper | ||
grafana: | ||
image: grafana/grafana:8.1.1 | ||
ports: | ||
- '3000:3000' | ||
volumes: | ||
- grafana-data:/var/lib/grafana | ||
- ./grafana-provisioning/:/etc/grafana/provisioning | ||
depends_on: | ||
- graphite | ||
environment: | ||
- GF_SECURITY_ADMIN_USER=admin | ||
- GF_SECURITY_ADMIN_PASSWORD=1234 | ||
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/jmeter.json | ||
volumes: | ||
graphite-data: | ||
grafana-data: |
6 changes: 6 additions & 0 deletions
6
docs/guide/reporting/real-time/graphite/grafana-provisioning/dashboards/dashboard.yml
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,6 @@ | ||
apiVersion: 1 | ||
providers: | ||
- name: JMeter Dashboards | ||
allowUiUpdates: true | ||
options: | ||
path: /etc/grafana/provisioning/dashboards |
Oops, something went wrong.