From a3934bce76dd6e297e27860f889b828a4d5ebaf4 Mon Sep 17 00:00:00 2001 From: darrenge Date: Tue, 24 Sep 2024 14:33:39 -0700 Subject: [PATCH] making it so don't need .json on end also setting yml to read from json file instead of .results file --- .github/workflows/ci-bdnbenchmark.yml | 4 ++-- test/BDNPerfTests/run_bdnperftest.ps1 | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-bdnbenchmark.yml b/.github/workflows/ci-bdnbenchmark.yml index 5a438e1912..44288bb074 100644 --- a/.github/workflows/ci-bdnbenchmark.yml +++ b/.github/workflows/ci-bdnbenchmark.yml @@ -37,7 +37,7 @@ jobs: os: [ ubuntu-latest, windows-latest ] framework: [ 'net8.0' ] configuration: [ 'Release' ] - test: [ 'CI_BDN_Config_RespParseStress.json', 'CI_BDN_Config_RespTsavoriteStress.json', 'CI_BDN_Config_RespClusterBench.json', 'CI_BDN_Config_RespClusterMigrateBench.json', 'CI_BDN_Config_Lua.json' ] + test: [ 'CI_BDN_Config_RespParseStress', 'CI_BDN_Config_RespTsavoriteStress', 'CI_BDN_Config_RespClusterBench', 'CI_BDN_Config_RespClusterMigrateBench', 'CI_BDN_Config_Lua' ] steps: - name: Check out code uses: actions/checkout@v4 @@ -80,7 +80,7 @@ jobs: # What benchmark tool the output.txt came from tool: 'benchmarkdotnet' # Where the output from the benchmark tool is stored - output-file-path: ./test/BDNPerfTests/results/CI_BDN_Config_RespParseStress_Linux.results + output-file-path: ./test/BDNPerfTests/results/${{ matrix.test }}_${{ matrix.os }}.json # Where the previous data file is stored external-data-json-path: ./cache/benchmark-data.json # Workflow will fail when an alert happens diff --git a/test/BDNPerfTests/run_bdnperftest.ps1 b/test/BDNPerfTests/run_bdnperftest.ps1 index f1a133de24..68fc4e2177 100644 --- a/test/BDNPerfTests/run_bdnperftest.ps1 +++ b/test/BDNPerfTests/run_bdnperftest.ps1 @@ -94,6 +94,11 @@ if ($pathstring.Contains("test")) { Set-Location .\test\BDNPerfTests\ } +# Add .json to end if not already there +if ($configFile -notlike "*.json") { + $configFile += ".json" +} + # Read the test config file and convert the JSON to a PowerShell object $fullConfiFileAndPath = "ConfigFiles/$configFile" if (-not (Test-Path -Path $fullConfiFileAndPath)) { @@ -210,7 +215,7 @@ $BDNbenchmarkErrorFile = "$errorLogDir/$justResultsFileNameNoExt" + "_StandardEr Write-Output "** Start BDN Benchmark: $filter" Write-Output " " -Write-Output "** Start: dotnet run -c $configuration -f $framework --filter $filter --project $BDNbenchmarkPath > $resultsFile 2> $BDNbenchmarkErrorFile" +Write-Output "** Start: dotnet run -c $configuration -f $framework --filter $filter --project $BDNbenchmarkPath --exporters json > $resultsFile 2> $BDNbenchmarkErrorFile" dotnet run -c $configuration -f $framework --filter $filter --project $BDNbenchmarkPath --exporters json > $resultsFile 2> $BDNbenchmarkErrorFile Write-Output "** BDN Benchmark for $filter finished"