зеркало из
1
0
Форкнуть 0
Julien Dubois 2022-10-06 18:25:23 +02:00
Родитель 1b8b148dc0 b99d1d4f9f
Коммит 1a392577dc
5 изменённых файлов: 691 добавлений и 15 удалений

Просмотреть файл

@ -159,5 +159,5 @@ Then we can use `curl` to test our apps:
----
curl https://${QUARKUS_HOST}/quarkus
curl https://${MICRONAUT_HOST}/micronaut
curl https://${SPRING_HOST}/spring
curl https://${SPRING_HOST}/springboot
----

Просмотреть файл

@ -47,7 +47,7 @@ Using the *Metrics* panel, you can select which metrics you want to observe, and
image::../images/standard-metrics.png[Screenshot of the Azure portal showing the list of standard metrics]
Select "_CPU Usage_" from the list of metrics, and select the last 30 minutes hours for the time range. You can see the CPU and memory usage for your application.
Select "_CPU Usage_" from the list of metrics, choose "_Max_" for the *Aggregation* and select the last 30 minutes hours for the time range (in the top right of the panel). You can see the CPU and memory usage for your application.
image::../images/metrics-cpu.png[Screenshot of the Azure portal showing the list of standard metrics]
@ -258,7 +258,7 @@ image::../images/load-testing-create-test.png[Screenshot of test creation]
1. You can either create a quick load test using a wizard, or create a load test using a JMeter script. Choose this second option.
2. Before uploading a JMeter script, create a load test by entering a name (eg. "_Make them fight_"), a description and select **Next**:
2. Before uploading a JMeter script, create a load test by entering a name (eg. "_Add some load!_"), a description and select **Next**:
+
image::../images/load-testing-jmeter.png[Screenshot of test setup]
@ -314,5 +314,79 @@ image::../images/dashboard-scale.png[Screenshot of dashboard showing load testin
== Scaling
// Set up CPU/Memory scaling
// Run load tests again with updated parameters
Now that we have seen the auto-scaling in action, let's dive a bit into fine-tuning its configuration.
[NOTE]
====
Azure Container Apps only support automatic _horizontal_ scaling, meaning that it will only scale the number of replicas of your application.
Vertical scaling (increasing the amount of available CPU and memory) is supported, but you need to do it manually.
====
Azure Container Apps support different types of https://learn.microsoft.com/azure/container-apps/scale-app[scaling rules], implemented using the KEDA https://keda.sh/docs/concepts/scaling-deployments/#scaledobject-spec[Scaling Object]. It supports the following triggers:
- _HTTP traffic_: Scaling based on the number of concurrent HTTP requests to your revision. This is the default scaling rule.
- _TCP traffic_: Scaling based on the number of concurrent TCP requests to your revision.
- _Event-driven_: Event-based triggers such as messages in an Azure Service Bus.
- _CPU_ or _Memory usage_: Scaling based on the amount of CPU or memory consumed by a replica.
As our applications provides endpoints to load either the CPU or the memory, we will explore usage of the _CPU_ and _Memory usage_ triggers to scale our application.
=== Scaling based on CPU usage
To scale based on CPU usage, we need to update the scale rule of the application to use the `cpu` trigger. This will create a new revision of the application, and will start a new deployment.
We will set a new scale rule for our Quarkus app using the Azure CLI:
[source,shell]
----
az containerapp update \
--name "$QUARKUS_APP" \
--resource-group "$RESOURCE_GROUP" \
--scale-rule-name "cpu-scaling" \
--scale-rule-type "cpu" \
--scale-rule-metadata type=Utilization value=10 \
--min-replicas 1 \
--max-replicas 10
----
This will automatically scale out the application when the CPU usage is above 10% (we set it low deliberately to make it easy to go up).
Go back to the Azure portal, and search for `lt-java-runtimes` to open again our load testing instance. Select *Tests* in the left sidebar, open the test we created earlier and select *Run* to run the load tests again.
Once the test is finished, go back to the "_Java Runtimes_" dashboard and take a look at the number of replicas chart again. You should see that the number of replicas has increased to 10, and that the CPU usage has increased as well.
// TODO
image::../images/dashboard-scale-cpu.png[Screenshot of dashboard showing CPU scaler results]
[NOTE]
====
When using either the _CPU_ or _Memory usage_ triggers, the minimum number of replicas will always be 1.
Only the HTTP trigger allows you to scale to 0.
====
=== Scaling based on memory usage
Another option that we can use is to scale based on the memory usage, with the `memory` trigger.
This we will set the scale rule for our Micronaut app using the command:
[source,shell]
----
az containerapp update \
--name "$MICRONAUT_APP" \
--resource-group "$RESOURCE_GROUP" \
--scale-rule-name "memory-scaling" \
--scale-rule-type "memory" \
--scale-rule-metadata type=Utilization value=15 \
--min-replicas 1 \
--max-replicas 10
----
This will automatically scale out the application when the memory usage is above 15% (we set it low deliberately to make it easy to go up).
Again, go back to the Azure portal and run the load tests again. Open the dashboard when the test is finished, and take a look at the number of replicas chart again.
You can now compare how the CPU (Quarkus), memory (Micronaut), and HTTP (Spring) triggers behave when scaling the application, under the same load.
// TODO
image::../images/dashboard-scale-memory.png[Screenshot of dashboard showing CPU scaler results]

Просмотреть файл

@ -1,7 +1,7 @@
#!/usr/bin/env bash
##############################################################################
# Usage: ./create-github-template.sh
# Creates a temporary folder with all the needed files to create a new project template.
# Creates a temporary folder in ~/temp/template with all the needed files to create a new project template.
##############################################################################
TEMPLATE_HOME=~/temp/template
@ -12,6 +12,7 @@ cp -r ../ $TEMPLATE_HOME
rm -rf $TEMPLATE_HOME/.idea
rm -rf $TEMPLATE_HOME/.vscode
rm -rf $TEMPLATE_HOME/docs
rm -rf $TEMPLATE_HOME/scripts/infra
rm -rf $TEMPLATE_HOME/scripts/create-github-template.sh
rm -rf $TEMPLATE_HOME/bootstrap.sh
rm -rf $TEMPLATE_HOME/CODE_OF_CONDUCT.md
@ -21,7 +22,7 @@ rm -rf $TEMPLATE_HOME/SUPPORT.md
### Fix the registry name of the workflow
rm -rf $TEMPLATE_HOME/.github/workflows/docs.yml
sed 's/javaruntimesregistrysinedied/javaruntimesregistryxxxxxxxx/' $TEMPLATE_HOME/.github/workflows/deploy.yml >> $TEMPLATE_HOME/.github/workflows/deploy-new.yml
sed 's/javaruntimesregistrysinedied/<YOUR_REGISTRY_URL>/' $TEMPLATE_HOME/.github/workflows/deploy.yml >> $TEMPLATE_HOME/.github/workflows/deploy-new.yml
rm $TEMPLATE_HOME/.github/workflows/deploy.yml
mv $TEMPLATE_HOME/.github/workflows/deploy-new.yml $TEMPLATE_HOME/.github/workflows/deploy.yml
@ -93,5 +94,4 @@ echo -e "<?xml version=\"1.0\"?>
" >> $TEMPLATE_HOME/pom.xml
### Removing the .git folder
sudo rm -rf $TEMPLATE_HOME/.git
rm -rf $TEMPLATE_HOME/.git

Просмотреть файл

@ -89,7 +89,7 @@
<stringProp name="HTTPSampler.port">${QUARKUS_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${QUARKUS_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/quarkus/cpu?iterations=10</stringProp>
<stringProp name="HTTPSampler.path">/quarkus/cpu?iterations=${CPU_ITERATIONS}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -142,7 +142,7 @@
<stringProp name="HTTPSampler.port">${QUARKUS_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${QUARKUS_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/quarkus/cpu?iterations=10&amp;db=true</stringProp>
<stringProp name="HTTPSampler.path">/quarkus/cpu?iterations=${CPU_ITERATIONS}&amp;db=true</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -195,7 +195,7 @@
<stringProp name="HTTPSampler.port">${QUARKUS_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${QUARKUS_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/quarkus/memory?bites=10</stringProp>
<stringProp name="HTTPSampler.path">/quarkus/memory?bites=${MEMORY_BITES}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -248,7 +248,543 @@
<stringProp name="HTTPSampler.port">${QUARKUS_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${QUARKUS_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/quarkus/memory?bites=10&amp;db=true</stringProp>
<stringProp name="HTTPSampler.path">/quarkus/memory?bites=${MEMORY_BITES}&amp;db=true</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
</hashTree>
<RecordingController guiclass="RecordController" testclass="RecordingController" testname="Micronaut" enabled="true"/>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="hello" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${MICRONAUT_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${MICRONAUT_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${MICRONAUT_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/micronaut</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="cpu" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${MICRONAUT_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${MICRONAUT_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${MICRONAUT_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/micronaut/cpu?iterations=${CPU_ITERATIONS}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="cpuWithDb" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${MICRONAUT_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${MICRONAUT_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${MICRONAUT_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/micronaut/cpu?iterations=${CPU_ITERATIONS}&amp;db=true</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="memory" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${MICRONAUT_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${MICRONAUT_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${MICRONAUT_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/micronaut/memory?bites=${MEMORY_BITES}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="memoryWithDb" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${MICRONAUT_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${MICRONAUT_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${MICRONAUT_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/micronaut/memory?bites=${MEMORY_BITES}&amp;db=true</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
</hashTree>
<RecordingController guiclass="RecordController" testclass="RecordingController" testname="Spring" enabled="true"/>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="hello" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${SPRING_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${SPRING_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${SPRING_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/springboot</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="cpu" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${SPRING_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${SPRING_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${SPRING_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/springboot/cpu?iterations=${CPU_ITERATIONS}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="cpuWithDb" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${SPRING_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${SPRING_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${SPRING_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/springboot/cpu?iterations=${CPU_ITERATIONS}&amp;db=true</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="memory" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${SPRING_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${SPRING_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${SPRING_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/springboot/memory?bites=${MEMORY_BITES}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-site</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">text/plain</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="memoryWithDb" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${SPRING_HOST}</stringProp>
<stringProp name="HTTPSampler.port">${SPRING_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">${SPRING_PROTOCOL}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/springboot/memory?bites=${MEMORY_BITES}&amp;db=true</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -357,6 +893,18 @@
<hashTree/>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="CPU_ITERATIONS" elementType="Argument">
<stringProp name="Argument.name">CPU_ITERATIONS</stringProp>
<stringProp name="Argument.value">${__P(CPU_ITERATIONS)}</stringProp>
<stringProp name="Argument.desc">Number of CPU iterations</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="MEMORY_BITES" elementType="Argument">
<stringProp name="Argument.name">MEMORY_BITES</stringProp>
<stringProp name="Argument.value">${__P(MEMORY_BITES)}</stringProp>
<stringProp name="Argument.desc">Number of memory bites</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="QUARKUS_PROTOCOL" elementType="Argument">
<stringProp name="Argument.name">QUARKUS_PROTOCOL</stringProp>
<stringProp name="Argument.value">${__P(QUARKUS_PROTOCOL)}</stringProp>
@ -375,6 +923,42 @@
<stringProp name="Argument.desc">Port number</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="MICRONAUT_PROTOCOL" elementType="Argument">
<stringProp name="Argument.name">MICRONAUT_PROTOCOL</stringProp>
<stringProp name="Argument.value">${__P(MICRONAUT_PROTOCOL)}</stringProp>
<stringProp name="Argument.desc">Can be http or https</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="MICRONAUT_HOST" elementType="Argument">
<stringProp name="Argument.name">MICRONAUT_HOST</stringProp>
<stringProp name="Argument.value">${__P(MICRONAUT_HOST)}</stringProp>
<stringProp name="Argument.desc">Base URL of the Fight endpoint</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="MICRONAUT_PORT" elementType="Argument">
<stringProp name="Argument.name">MICRONAUT_PORT</stringProp>
<stringProp name="Argument.value">${__P(MICRONAUT_PORT)}</stringProp>
<stringProp name="Argument.desc">Port number</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="SPRING_PROTOCOL" elementType="Argument">
<stringProp name="Argument.name">SPRING_PROTOCOL</stringProp>
<stringProp name="Argument.value">${__P(SPRING_PROTOCOL)}</stringProp>
<stringProp name="Argument.desc">Can be http or https</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="SPRING_HOST" elementType="Argument">
<stringProp name="Argument.name">SPRING_HOST</stringProp>
<stringProp name="Argument.value">${__P(SPRING_HOST)}</stringProp>
<stringProp name="Argument.desc">Base URL of the Fight endpoint</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="SPRING_PORT" elementType="Argument">
<stringProp name="Argument.name">SPRING_PORT</stringProp>
<stringProp name="Argument.value">${__P(SPRING_PORT)}</stringProp>
<stringProp name="Argument.desc">Port number</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>

Просмотреть файл

@ -1,6 +1,8 @@
LOOPS=20
THREADS=2
LOOPS=50
THREADS=16
RAMP=1
CPU_ITERATIONS=5
MEMORY_BITES=20
#########
# Azure #
@ -9,9 +11,25 @@ QUARKUS_PROTOCOL=https
QUARKUS_HOST=quarkus-app.mangodesert-f75fa955.eastus.azurecontainerapps.io
QUARKUS_PORT=443
MICRONAUT_PROTOCOL=https
MICRONAUT_HOST=micronaut-app.mangodesert-f75fa955.eastus.azurecontainerapps.io
MICRONAUT_PORT=443
SPRING_PROTOCOL=https
SPRING_HOST=springboot-app.mangodesert-f75fa955.eastus.azurecontainerapps.io
SPRING_PORT=443
#########
# Local #
#########
# QUARKUS_PROTOCOL=http
# QUARKUS_HOST=localhost
# QUARKUS_PORT=8701
# MICRONAUT_PROTOCOL=http
# MICRONAUT_HOST=localhost
# MICRONAUT_PORT=8702
# SPRING_PROTOCOL=https
# SPRING_HOST=localhost
# SPRING_PORT=8703