Skip to content

Commit 4a96a0f

Browse files
authored
Crank script updates (#6591)
1 parent 312c012 commit 4a96a0f

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed

tools/Crank/benchmarks.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
readyStateText: Application started.
1111

1212
scenarios:
13-
functionApp:
13+
http:
1414
application:
1515
job: server
1616
environmentVariables:
@@ -21,6 +21,37 @@ scenarios:
2121
variables:
2222
path: /api/Hello
2323
duration: 180
24+
http-appsvc:
25+
application:
26+
job: server
27+
environmentVariables:
28+
HOME: "{{ TempPath }}"
29+
WEBSITE_SITE_NAME: "Test"
30+
WEBSITE_INSTANCE_ID: "8399B720-AB73-46D6-94DE-5A27871B3155"
31+
WEBSITE_OWNER_NAME: "A5F47496-A284-4788-A127-E79454330567+westuswebspace"
32+
AzureWebJobsScriptRoot: "{{ FunctionAppPath }}"
33+
ASPNETCORE_URLS: "http://localhost:5000;https://localhost:5001"
34+
load:
35+
job: bombardier
36+
variables:
37+
path: /api/Hello
38+
duration: 180
39+
http-linux-appsvc:
40+
application:
41+
job: server
42+
environmentVariables:
43+
HOME: "{{ TempPath }}"
44+
WEBSITE_SITE_NAME: "Test"
45+
WEBSITE_INSTANCE_ID: "8399B720-AB73-46D6-94DE-5A27871B3155"
46+
WEBSITE_OWNER_NAME: "A5F47496-A284-4788-A127-E79454330567+westuswebspace"
47+
FUNCTIONS_LOGS_MOUNT_PATH: "{{ TempLogPath }}"
48+
AzureWebJobsScriptRoot: "{{ FunctionAppPath }}"
49+
ASPNETCORE_URLS: "http://localhost:5000;https://localhost:5001"
50+
load:
51+
job: bombardier
52+
variables:
53+
path: /api/Hello
54+
duration: 180
2455

2556
profiles:
2657
local:

tools/Crank/run-benchmarks.ps1

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ param(
44
$CrankAgentVm,
55

66
[string]
7-
$FunctionsHostBranchOrCommit = 'dev',
7+
$BranchOrCommit = 'dev',
8+
9+
[string]
10+
$Scenario = 'http',
811

912
[string]
1013
$FunctionApp = 'HelloApp',
@@ -59,18 +62,22 @@ $crankConfigPath = Join-Path `
5962
$isLinuxApp = $CrankAgentVm -match '\blinux\b'
6063

6164
$functionAppRootPath = if ($isLinuxApp) { "/home/$UserName/FunctionApps" } else { 'C:\FunctionApps' }
62-
6365
$functionAppPath = Join-Path `
6466
-Path $functionAppRootPath `
6567
-ChildPath $FunctionApp
6668

69+
$tmpPath = if ($isLinuxApp) { "/tmp" } else { 'C:\Temp' }
70+
$tmpLogPath = if ($isLinuxApp) { "/tmp/functions/log" } else { 'C:\Temp\Functions\Log' }
71+
6772
$crankArgs =
6873
'--config', $crankConfigPath,
69-
'--scenario', 'functionApp',
74+
'--scenario', $Scenario,
7075
'--profile', 'local',
7176
'--variable', "CrankAgentVm=$CrankAgentVm",
7277
'--variable', "FunctionAppPath=`"$functionAppPath`"",
73-
'--variable', "FunctionsHostBranchOrCommit=$FunctionsHostBranchOrCommit"
78+
'--variable', "TempPath=`"$tmpPath`"",
79+
'--variable', "TempLogPath=`"$tmpLogPath`"",
80+
'--variable', "BranchOrCommit=$BranchOrCommit"
7481

7582
if ($WriteResultsToDatabase) {
7683
Set-AzContext -Subscription 'Antares-Demo' > $null

0 commit comments

Comments
 (0)