Skip to content

Commit

Permalink
Merge pull request #6 from Informatievlaanderen/chore/workbench-tests
Browse files Browse the repository at this point in the history
Chore/workbench tests
  • Loading branch information
rorlic authored Mar 26, 2024
2 parents 4d2da9d + c5976ce commit ec4bafe
Show file tree
Hide file tree
Showing 37 changed files with 14,684 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/.idea/
/data/epsg/
/*/tests/.java/
/*/tests/jmeter.log
jmeter.log
3 changes: 3 additions & 0 deletions load-testing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tests/**
jmeter.log
database
40 changes: 40 additions & 0 deletions load-testing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Load Testing
Here you can find load tests for:
* the [LDES Server](./server/README.md)
* the [LDIO Workbench](./workbench/README.md)

## Initialization
Before running the tests you need to create the required locations (with the correct permissions):

for the runner:
```bash
mkdir -p ./database
chmod o+w ./database
```
for the server:
```bash
mkdir -p ./server/tmp/epsg
chmod o+w ./server/tmp/epsg
```
for the workbench:
```bash
mkdir -p ./workbench/tmp/epsg
chmod o+w ./workbench/tmp/epsg
```
for the runner:
```bash
mkdir -p ./tests
chmod o+w ./tests
```

## Start Systems
To spin up the systems:
```bash
docker compose up -d
```

## Stop Systems
To bring down the systems:
```bash
docker compose down
```
119 changes: 119 additions & 0 deletions load-testing/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
version: '3.3'

networks:
performance_testing:
name: performance_testing_network

services:

jmeter-runner:
container_name: performance_testing_jmeter-runner
image: ghcr.io/informatievlaanderen/jmeter-runner:20240319T2055
networks:
- performance_testing
ports:
- 9000:80
volumes:
- ${TEST_FOLDER:-./tests}:/home/node/jmeter-runner/tests:rw
depends_on:
ldes-server:
condition: service_healthy
ldes-server-workbench:
condition: service_healthy
environment:
- TEST_FOLDER_BASE=/home/node/jmeter-runner/tests
- BASE_URL=${BASE_URL:-http://localhost:9000}
- SILENT=${SILENT:-true}
- MAX_RUNNING=${MAX_RUNNING:-1}
- REFRESH_TIME=${REFRESH_TIME:-30}
- RUN_TEST_API_KEY=${RUN_TEST_API_KEY:-}
- CHECK_TEST_API_KEY=${CHECK_TEST_API_KEY:-}
- DELETE_TEST_API_KEY=${DELETE_TEST_API_KEY:-}
deploy:
resources:
limits:
cpus: '0.5'
memory: '1.0GB'
reservations:
cpus: '0.1'
memory: '0.25GB'

ldes-server-workbench:
container_name: performance_testing_ldio-workbench
# image: ldes/ldi-orchestrator:${LDI_ORCHESTRATOR_TAG:-2.2.0-SNAPSHOT}
# image: ghcr.io/informatievlaanderen/ldi-orchestrator:latest
image: ghcr.io/informatievlaanderen/ldi-orchestrator:20240325132113
networks:
- performance_testing
ports:
- ${LDIO_WORKBENCH_PORT:-8081}:8080
volumes:
- ./workbench/tmp/epsg:/tmp/Databases:rw
- ./workbench/config.yml:/ldio/application.yml:ro
healthcheck:
test: ["CMD", "wget", "-qO-", "http://ldes-server-workbench:8080/actuator/health"]
environment:
- SIS_DATA=/tmp
- JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=90 -XX:MinRAMPercentage=50
- SERVER_PORT=8080
- ORCHESTRATOR_DIRECTORY=/ldio/pipelines
deploy:
resources:
limits:
cpus: '3.5'
memory: '15.0GB'
reservations:
cpus: '0.10'
memory: '0.25GB'

ldes-mongodb:
container_name: performance_testing_ldes-mongodb
image: mongo:${MONGODB_TAG:-latest}
networks:
- performance_testing
ports:
- ${MONGODB_PORT:-27017}:27017
# volumes:
# - ./database:/data/db:rw
deploy:
resources:
limits:
cpus: '1.0'
memory: '3.0GB'
reservations:
cpus: '0.50'
memory: '0.5GB'

ldes-server:
container_name: performance_testing_ldes-server
# image: ldes/ldes-server:${LDES_SERVER_TAG:-2.3.0-SNAPSHOT} # CrowdScan
# image: ldes/ldes-server:${LDES_SERVER_TAG:-2.4.1-SNAPSHOT} # Geomobility
# image: ldes/ldes-server:${LDES_SERVER_TAG:-2.10.0-SNAPSHOT} # Telraam
# image: ldes/ldes-server:${LDES_SERVER_TAG:-2.11.0-SNAPSHOT}
# image: ghcr.io/informatievlaanderen/ldes-server:latest
image: ghcr.io/informatievlaanderen/ldes-server:20240325155939
networks:
- performance_testing
ports:
- ${LDES_SERVER_PORT:-8080}:8080
volumes:
- ./server/tmp/epsg:/tmp/Databases:rw
- ./server/config.yml:/application.yml:ro
depends_on:
- ldes-mongodb
healthcheck:
test: ["CMD", "wget", "-qO-", "http://ldes-server:8080/actuator/health"]
environment:
- SIS_DATA=/tmp
- JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=90 -XX:MinRAMPercentage=50
- SPRING_DATA_MONGODB_URI=mongodb://ldes-mongodb:27017/performance-testing
- LDESSERVER_HOSTNAME=http://ldes-server:${LDES_SERVER_PORT:-8080}
- SERVER_PORT=8080
deploy:
resources:
limits:
cpus: '3.0'
memory: '2.0GB'
reservations:
cpus: '0.50'
memory: '0.5GB'
1 change: 1 addition & 0 deletions load-testing/server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp
14 changes: 14 additions & 0 deletions load-testing/server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Server Tests
TODO: describe tests

### Run The Test
To run the test:
```bash
curl -X POST "http://localhost:9000?category=Server" -H "Content-Type: application/xml" --data-binary @./ingest.speed.08T.jmx
```
```bash
curl -X POST "http://localhost:9000?category=Server" -H "Content-Type: application/xml" --data-binary @./ingest.duration.jmx
```
```bash
curl -X POST "http://localhost:9000?category=Server" -H "Content-Type: application/xml" --data-binary @./fetch.250mpp.jmx
```
25 changes: 25 additions & 0 deletions load-testing/server/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
spring:
data:
mongodb:
auto-index-creation: true

management:
tracing:
enabled: false
endpoints:
web:
exposure:
include:
- health
- info
- prometheus
health:
defaults:
enabled: true
mongo:
enabled: true
dcat:
enabled: true
endpoint:
health:
show-details: always
Loading

0 comments on commit ec4bafe

Please sign in to comment.