sample for running long term tests in cloud

This commit is contained in:
sebastianburckhardt 2024-07-22 13:59:29 -07:00
Родитель 3f1a59aecf
Коммит f845797c99
8 изменённых файлов: 66 добавлений и 8 удалений

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

@ -44,11 +44,11 @@
},
"durableTask": {
"hubName": "perftests",
"hubName": "squirrel",
"UseGracefulShutdown": true, // helps to avoid lengthy waits for lease expiration
"maxConcurrentActivityFunctions": "100",
"maxConcurrentActivityFunctions": "50",
"maxConcurrentOrchestratorFunctions": "100",
"storageProvider": {
@ -59,7 +59,7 @@
"StorageConnectionName": "AzureWebJobsStorage",
"EventHubsConnectionName": "EventHubsConnection",
"TakeStateCheckpointWhenStoppingPartition": "true",
"TakeStateCheckpointWhenStoppingPartition": "false",
"MaxNumberBytesBetweenCheckpoints": "20000000",
"MaxNumberEventsBetweenCheckpoints": "10000",
"IdleCheckpointFrequencyMs": "60000",
@ -111,8 +111,8 @@
// it limits production, not just consumption, of the events, so it can be used to prevent overheads.
// "Debug" is a reasonable setting, as it allows troubleshooting without impacting perf too much.
"LogLevelLimit": "Debug",
"StorageLogLevelLimit": "Debug",
"TransportLogLevelLimit": "Debug",
"StorageLogLevelLimit": "Trace",
"TransportLogLevelLimit": "Trace",
"EventLogLevelLimit": "Debug",
"WorkItemLogLevelLimit": "Debug",
"ClientLogLevelLimit": "Debug",

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

@ -0,0 +1,9 @@
#!/bin/bash
for i in {1..500}
do
echo "---- Iteration $i ---- " ` date -u`
curl "https://functionssb4.azurewebsites.net/many/it$i-/start" --max-time 300 -d FanOutFanInOrchestration.200/1000
curl "https://functionssb4.azurewebsites.net/many/it$i-/await" -d 200 --max-time 300
curl "https://functionssb4.azurewebsites.net/many/it$i-/purge" -d 200 --max-time 300
sleep 100
done

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

@ -0,0 +1,9 @@
#!/bin/bash
for i in {1..500}
do
echo "---- Iteration $i ---- " ` date -u`
curl "https://functionssb4.azurewebsites.net/many/d$i-/start" --max-time 300 -d HelloSequence5.10000.200
curl "https://functionssb4.azurewebsites.net/many/d$i-/await" -d 10000 --max-time 300
curl "https://functionssb4.azurewebsites.net/many/d$i-/purge" -d 10000 --max-time 300
sleep 150
done

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

@ -0,0 +1,2 @@
watch -t -n 30 curl -s https://functionssb4.azurewebsites.net/ping -d 12

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

@ -0,0 +1,22 @@
To deploy the service
```
pwsh scripts\deploy.ps1
```
Check that it is up and running with
```
curl -s https://functionssb4.azurewebsites.net/ping -d 12
```
To generate load, run these two scripts in two separate terminals:
fanoutfanin.bash
hellosequence.bash
both of them have long breaks between active periods so that the service has some idle periods where it will scale in.

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

@ -0,0 +1,13 @@
#!/bin/bash
for i in {1..100}
do
echo "---- Iteration $i ---- " ` date -u`
for j in {0..99}
do
curl "https://functionssb4.azurewebsites.net/store/$1$j" -d 8000
sleep 2
done
sleep 30
curl -X delete "https://functionssb4.azurewebsites.net/storevector/$1/100"
sleep 300
done

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

@ -54,7 +54,10 @@ if (-not ((az functionapp list -g $groupName --query "[].name"| ConvertFrom-Json
az functionapp create --name $functionAppName --storage-account $storageName --plan $functionAppName --resource-group $groupName --functions-version 4
}
az functionapp config set -n $functionAppName -g $groupName --use-32bit-worker-process false
# it seems that freshly created function apps are not always immediately available
Start-Sleep -Seconds 10
set -n $functionAppName -g $groupName --use-32bit-worker-process false
az functionapp config appsettings set -n $functionAppName -g $groupName --settings EventHubsConnection=$eventHubsConnectionString
az functionapp config appsettings set -n $functionAppName -g $groupName --settings EHNamespace=$Env:EHNamespace
}

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

@ -2,10 +2,10 @@
Write-Host "Using parameters specified in settings.ps1."
# always edit this parameter before running the scripts
$name="globally-unique-alphanumeric-name-with-no-dashes"
$name="functionssb4"
# review these parameters before running the scripts
$location="eastus"
$location="eastus2"
$storageSku="Standard_LRS"
# optionally, customize the following parameters