Skip to content

Commit 48712e8

Browse files
authored
Switching to func-cold-start-data-writer tool to persist cold start data. (#11197)
1 parent 0517532 commit 48712e8

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
<add key="AzureFunctionsRelease" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsRelease/nuget/v3/index.json" />
99
<add key="AzureFunctionsPreRelease" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsPreRelease/nuget/v3/index.json" />
1010
<add key="AzureFunctionsTempStaging" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsTempStaging/nuget/v3/index.json" />
11+
<add key="AzureFunctionsInfra" value="https://pkgs.dev.azure.com/azfunc/public/_packaging/infra/nuget/v3/index.json" />
1112
</packageSources>
1213
</configuration>

eng/ci/templates/official/jobs/process-coldstart.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
artifact: $(artifactName)
3838

3939
steps:
40-
- checkout: none
4140
- pwsh: |
4241
$sampleSize = $env:SAMPLE_SIZE
4342
$values = @()
@@ -98,15 +97,8 @@ jobs:
9897
scriptType: 'pscore'
9998
scriptLocation: 'inlineScript'
10099
inlineScript: |
101-
$json = Get-Content -Path $(resultsJsonPath) -Raw
102-
$dateTimeUtc = [datetimeoffset]::UtcNow
103-
104-
$query = @"
105-
INSERT INTO ColdStart (DateTimeUtc, OS, Description, Document)
106-
VALUES ('$dateTimeUtc', '${{ parameters.os }}', '${{ parameters.description }}', '$json')
107-
"@
108-
109-
Invoke-Sqlcmd -ConnectionString "$(ColdStartResultsSqlConnectionString)" -Query $query
110-
100+
$env:PATH = [System.IO.Path]::Combine($env:USERPROFILE, ".dotnet", "tools") + ";$env:PATH"
101+
dotnet tool install -g Microsoft.Azure.Functions.ColdStartDataWriter --prerelease
102+
func-cold-start-data-writer --os '${{ parameters.os }}' --description '${{ parameters.description }}' --sql-connection '$(ColdStartResultsSqlConnectionString)' --document-file-path '$(resultsJsonPath)'
111103
displayName: Persist results
112104
condition: eq(variables['Build.Reason'], 'Schedule')

0 commit comments

Comments
 (0)