[AIAB-02] Automate performance tests
Next you will need to create a workflow that specifies how Akamas applies the parameters to be optimized, how to automate the launch of JMeter performance tests, and how to collect metrics from Prometheus telemetry. For now, you will create a simple automation workflow that executes a quick two-minute performance test to make sure everything is working properly.
The file workflow-baseline.yaml
contains the definition of the steps to perform during the test:
name: konakart-baseline
tasks:
- name: Performance test
operator: Executor
arguments:
command: "docker run --net=akamas_lab --rm --name jmeter -i -v $(pwd)/konakart-docker/jmeter:/tmp -w /tmp -p 9270:9270 chiabre/jmeter_plugins -t ramp_test_plan.jmx -JTARGET_HOST=target_host -JTHREADS=10 -JRAMP_SEC=120 -JRANDOM_DELAY_MAX_MS=0"
host:
hostname: target_host
username: ubuntu
key: /home/jsmith/.ssh/akamas.key
Please make sure to modify the workflow-baseline.yaml
file replacing the following placeholders with the correct references to your environment:
hostname should reference your Konakart instance in place of the placeholder target_host
username and key must reflect your Konakart instance user and SSH private key file (also check the path /home/jsmith)
TARGET_HOST in the JMeter command line should reference your Konakart instance in place of the placeholder target_host
Then create the workflow:
akamas create workflow workflow-baseline.yaml
To execute this workflow we'll use a simple Akamas study that includes a single step of type baseline
. This type of step simply executes one experiment without leveraging Akamas AI - you will add the AI-driven optimization step later.
The study-baseline.yaml
file defines the study as follows:
name: Baseline konakart
description: A first study to validate the automated testing process
system: konakart
goal:
objective: maximize
function:
formula: konakart.transactions_throughput
workflow: konakart-baseline
steps:
- name: baseline
type: baseline
Create the study:
akamas create study study-baseline.yaml
Now, you can run the study by clicking Start from the UI, or by executing the following command:
akamas start study 'Baseline konakart'
You should now see the baseline experiment running in the Progress tab of the Akamas UI.
Notice that you can also monitor JMeter performance tests live by accessing Grafana on port 3000
of your Konakart instance, then selecting the JMeter Exporter dashboard:

You can relaunch the baseline study at any time you want by pressing the Start button again. If you want, you can also adjust the JMeter scenario settings in the workflow - see the Konakart setup guide for more details on the JMeter plans and variables you can set.
You will notice that the baseline experiment will fail on the telemetry task - see Progress tab in the UI. This is expected, as you still have not configured the Akamas telemetry, i.e. how Akamas can collect metrics - you will do this in the next section.
Last updated
Was this helpful?