Skip to content

Commit

Permalink
Merge pull request #21 from Informatievlaanderen/chore/update-workben…
Browse files Browse the repository at this point in the history
…ch-tests

Chore/update workbench tests
  • Loading branch information
rorlic authored Dec 27, 2024
2 parents 5121792 + 0fa7e2d commit 6f95410
Show file tree
Hide file tree
Showing 33 changed files with 7,053 additions and 1,301 deletions.
16 changes: 9 additions & 7 deletions load-testing/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ services:

load-testing-ldio-workbench-workbench:
container_name: performance_testing_ldio-workbench
# image: ldes/ldi-orchestrator:${LDI_ORCHESTRATOR_TAG:-2.10.0-SNAPSHOT}
image: ghcr.io/informatievlaanderen/ldi-orchestrator:20241108154702 # TODO: use 2.10
image: ldes/ldi-orchestrator:${LDI_ORCHESTRATOR_TAG:-2.12.0}
networks:
- performance_testing
ports:
Expand All @@ -120,7 +119,7 @@ services:
resources:
limits:
cpus: '3.5'
memory: '4.0GB'
memory: '6.0GB'
reservations:
cpus: '0.10'
memory: '0.25GB'
Expand Down Expand Up @@ -159,8 +158,7 @@ services:
# 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:-3.4.0-SNAPSHOT}
image: ldes/ldes-server:${LDES_SERVER_TAG:-3.5.0-SNAPSHOT}
image: ldes/ldes-server:${LDES_SERVER_TAG:-3.6.0}
networks:
- performance_testing
ports:
Expand All @@ -177,16 +175,20 @@ services:
timeout: 3s
retries: 20
environment:
- REST_MAXAGE=1
- SPRING_TASK_SCHEDULING_POOL_SIZE=10
- LDESSERVER_FRAGMENTATIONCRON=${LDES_SERVER_FRAGMENTATION_CRON:-*/1 * * * * *}
- SIS_DATA=/tmp
- JAVA_TOOL_OPTIONS=-XX:MaxRAMPercentage=90 -XX:MinRAMPercentage=50
- SPRING_DATASOURCE_URL=jdbc:postgresql://ldes-postgres:5432/${POSTGRES_DB}
- SPRING_DATASOURCE_USERNAME=${POSTGRES_USER}
- SPRING_DATASOURCE_PASSWORD=${POSTGRES_PWD}
- LDESSERVER_HOSTNAME=http://ldes-server:${LDES_SERVER_PORT:-8080}
- LDESSERVER_HOSTNAME=http://ldes-server:8080
- SERVER_PORT=8080
- LDESSERVER_MAINTENANCECRON=-
- MANAGEMENT_TRACING_ENABLED=false
- MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE=health,info,prometheus
- MANAGEMENT_ENDPOINT_HEALTH_SHOWDETAILS=always
# - PYROSCOPE_AGENT_ENABLED=true
# - PYROSCOPE_APPLICATION_NAME=ldes-server
# - PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040
Expand All @@ -195,7 +197,7 @@ services:
resources:
limits:
cpus: '3.0'
memory: '3.0GB'
memory: '4.0GB'
reservations:
cpus: '0.50'
memory: '0.5GB'
Expand Down
6 changes: 3 additions & 3 deletions load-testing/prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ global:

scrape_configs:
- job_name: 'ldes-server'
scrape_interval: 5s
scrape_interval: 1s
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['ldes-server:8080']
- job_name: 'ldio-workbench'
scrape_interval: 5s
scrape_interval: 1s
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['ldio-workbench:8080']
- targets: ['load-testing-ldio-workbench-workbench:8080']
10 changes: 5 additions & 5 deletions load-testing/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

```bash
cd ./server
export CATEGORY="Server%20(3.5.0)"
export CATEGORY="Server%20(3.6.0)"
export TEST_SERVER_BASE="http://localhost:9000"
export X_API_KEY=
```

```bash
./run-ingest-sequential.sh
clear && for((i=0;i<7;i++)) do ./run-ingest-sequential.sh ; done
```

```bash
./run-fragment-sequential.sh
clear && for((i=0;i<7;i++)) do ./run-fragment-sequential.sh ; done
```

```bash
./run-both-parallel.sh
clear && for((i=0;i<7;i++)) do ./run-both-parallel.sh ; done
```

```bash
./run-fetch.sh
clear && for((i=0;i<7;i++)) do ./run-fetch.sh ; done
```

```bash
Expand Down
24 changes: 4 additions & 20 deletions load-testing/server/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,7 @@ spring:
codec:
max-in-memory-size: 100MB

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
springdoc:
swagger-ui:
path: /v1/swagger
urlsPrimaryName: base
Binary file modified load-testing/server/results.xlsx
Binary file not shown.
16 changes: 16 additions & 0 deletions load-testing/workbench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,19 @@ To run the large message test in parallel using 8 threads:
```bash
curl -X POST "http://localhost:9000/test?category=Workbench" -H "Content-Type: application/xml" --data-binary @./throughput.L-08T.jmx
```

> TODO from here -------------------------------------
```bash
export CATEGORY="Workbench%20(2.12.0)"
export TEST_SERVER_BASE="http://localhost:9000"
export X_API_KEY=
```

```bash
./run-fetch.sh
```

```bash
clear && for((i=0;i<7;i++)) do ./run-throughput.sh ; done
```
20 changes: 4 additions & 16 deletions load-testing/workbench/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@ logging:
be.vlaanderen.informatievlaanderen.ldes.ldio.Application: INFO
be.vlaanderen.informatievlaanderen.ldes: WARN

management:
tracing:
enabled: false
endpoints:
web:
exposure:
include:
- health
- info
- prometheus
health:
defaults:
enabled: true
endpoint:
health:
show-details: always
springdoc:
swagger-ui:
path: /v1/swagger
urlsPrimaryName: base
1,126 changes: 1,126 additions & 0 deletions load-testing/workbench/fetch.10000mpp.jmx

Large diffs are not rendered by default.

515 changes: 346 additions & 169 deletions load-testing/workbench/fetch.1000mpp.jmx

Large diffs are not rendered by default.

515 changes: 346 additions & 169 deletions load-testing/workbench/fetch.100mpp.jmx

Large diffs are not rendered by default.

547 changes: 361 additions & 186 deletions load-testing/workbench/fetch.10mpp.jmx

Large diffs are not rendered by default.

1,126 changes: 1,126 additions & 0 deletions load-testing/workbench/fetch.2500mpp.jmx

Large diffs are not rendered by default.

517 changes: 347 additions & 170 deletions load-testing/workbench/fetch.250mpp.jmx

Large diffs are not rendered by default.

520 changes: 348 additions & 172 deletions load-testing/workbench/fetch.25mpp.jmx

Large diffs are not rendered by default.

1,126 changes: 1,126 additions & 0 deletions load-testing/workbench/fetch.5000mpp.jmx

Large diffs are not rendered by default.

523 changes: 350 additions & 173 deletions load-testing/workbench/fetch.500mpp.jmx

Large diffs are not rendered by default.

515 changes: 346 additions & 169 deletions load-testing/workbench/fetch.50mpp.jmx

Large diffs are not rendered by default.

108 changes: 103 additions & 5 deletions load-testing/workbench/ingest.throughput.L-01T.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<collectionProp name="Arguments.arguments">
<elementProp name="count" elementType="Argument">
<stringProp name="Argument.name">count</stringProp>
<stringProp name="Argument.value">2500</stringProp>
<stringProp name="Argument.value">2492</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="loops" elementType="Argument">
Expand All @@ -62,10 +62,20 @@
<stringProp name="Argument.value">8080</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="total_member_count" elementType="Argument">
<stringProp name="Argument.name">total_member_count</stringProp>
<stringProp name="Argument.value">498400</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="total_member_count" elementType="Argument">
<stringProp name="Argument.name">total_member_count</stringProp>
<stringProp name="Argument.value">500000</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults">
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
<intProp name="HTTPSampler.connect_timeout">3000</intProp>
<intProp name="HTTPSampler.response_timeout">5000</intProp>
<stringProp name="HTTPSampler.domain">${hostname}</stringProp>
Expand All @@ -78,7 +88,7 @@
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
</ConfigTestElement>
<hashTree/>
<SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Setup">
<SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="Setup" enabled="true">
<intProp name="ThreadGroup.num_threads">1</intProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
Expand Down Expand Up @@ -340,7 +350,32 @@ outputs:&#xd;
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test - Initialize throughput timing">
<boolProp name="ThreadGroup.delayedStart">true</boolProp>
<intProp name="ThreadGroup.num_threads">1</intProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Test - set throughput start time">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="cacheKey">true</stringProp>
<stringProp name="script">def now = String.valueOf(System.currentTimeMillis());

props.put(&quot;throughput_starttime&quot;, now);
log.info(&quot;throughput_starttime: &quot; + props.get(&quot;throughput_starttime&quot;));
</stringProp>
</JSR223Sampler>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test" enabled="true">
<boolProp name="ThreadGroup.delayedStart">true</boolProp>
<stringProp name="ThreadGroup.num_threads">${threads}</stringProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
Expand All @@ -363,8 +398,8 @@ outputs:&#xd;
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Test - Send ${count} features (${threads}T)" enabled="true">
<intProp name="HTTPSampler.response_timeout">300000</intProp>
<intProp name="HTTPSampler.concurrentPool">6</intProp>
<intProp name="HTTPSampler.response_timeout">300000</intProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
Expand Down Expand Up @@ -418,6 +453,69 @@ outputs:&#xd;
<hashTree/>
</hashTree>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test - Calculate throughput timing">
<intProp name="ThreadGroup.num_threads">1</intProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
</ThreadGroup>
<hashTree>
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Test - Throughput result writer">
<stringProp name="scriptLanguage">groovy</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="cacheKey">true</stringProp>
<stringProp name="script">log.info(&quot;starting throughput analysis&quot;);

def start = props.get(&quot;throughput_starttime&quot;) as long;
def end = System.currentTimeMillis() as long;

log.info(&quot;start: &quot; + start);
log.info(&quot;end: &quot; + end);

def delta = end - start;
def perSecond = (${total_member_count} as long) / delta * 1000 as int;
return &quot;\n\t\tThroughput time: &quot; + delta + &quot; ms (&quot; + perSecond + &quot; per second)&quot;;
</stringProp>
</JSR223Sampler>
<hashTree>
<ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>false</time>
<latency>false</latency>
<timestamp>false</timestamp>
<success>false</success>
<label>false</label>
<code>false</code>
<message>false</message>
<threadName>false</threadName>
<dataType>false</dataType>
<encoding>false</encoding>
<assertions>false</assertions>
<subresults>false</subresults>
<responseData>true</responseData>
<samplerData>false</samplerData>
<xml>true</xml>
<fieldNames>false</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
</value>
</objProp>
<stringProp name="filename">stats.xml</stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
<PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="Tear Down" enabled="true">
<intProp name="ThreadGroup.num_threads">1</intProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
Expand Down
Loading

0 comments on commit 6f95410

Please sign in to comment.