This repository contains the load testing scripts for simod-on-containers, a solution for scalable business process discovery using Kubernetes as the container orchestration platform.
This repository provides a container image for the testing. The testing itself is executed using a Kubernetes manifest file such as locust-scalability-travel.yaml or locust-scalability-payments.yaml.
Below you can find sample MongoDB queries to retrieve data for the scalability experiment.
Mongo query to count finished requests:
db.requests.count({ status: {$eq: 'succeeded' } })
Mongo query to calculate duration of the experiment in milliseconds:
db.requests.aggregate([
{
$match: {
finished_timestamp: { $exists: true, $ne: null }
}
},
{
$project: {
_id: 1,
start: {
$min: ["$created_timestamp"]
},
end: {
$max: ["$finished_timestamp"]
}
}
},
{
$group: {
_id: null,
start: {
$min: "$start"
},
end: {
$max: "$end"
}
},
},
{
$project: {
_id: 0,
duration: {
$subtract: ["$end", "$start"]
}
}
}
])
Mongo query to calculate the duration of each request:
db.requests.aggregate([
{
$match: {
finished_timestamp: { $exists: true, $ne: null }
}
},
{
$project: {
_id: 1,
duration: {
$subtract: ["$finished_timestamp", "$created_timestamp"]
}
}
}
])
Export the database to a file:
mongoexport --db=simod --collection=requests --type=json --out=requests.json -u root -p example --authenticationDatabase=adminCopy the file from a pod to the local machine:
kubectl cp <pod-name>:requests.json ./requests.json