Skip to content

Commit b59aab9

Browse files
🩹 [Patch]: Wrap benchmark build-path assignments for lint
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 9868cff commit b59aab9

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

tools/benchmark/Invoke-ImportBenchmark.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ param(
3030
$ErrorActionPreference = 'Stop'
3131

3232
if (-not $ModulePath) {
33-
$ModulePath = & (Join-Path -Path $PSScriptRoot -ChildPath 'Build-LocalModule.ps1') -OutputPath (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'SodiumBench')
33+
$buildScript = Join-Path -Path $PSScriptRoot -ChildPath 'Build-LocalModule.ps1'
34+
$tempBuildPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'SodiumBench'
35+
$ModulePath = & $buildScript -OutputPath $tempBuildPath
3436
}
3537

3638
$times = for ($i = 0; $i -lt $Samples; $i++) {

tools/benchmark/Invoke-PerformanceBenchmark.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ param(
3131
$ErrorActionPreference = 'Stop'
3232

3333
if (-not $ModulePath) {
34-
$ModulePath = & (Join-Path -Path $PSScriptRoot -ChildPath 'Build-LocalModule.ps1') -OutputPath (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'SodiumBench')
34+
$buildScript = Join-Path -Path $PSScriptRoot -ChildPath 'Build-LocalModule.ps1'
35+
$tempBuildPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'SodiumBench'
36+
$ModulePath = & $buildScript -OutputPath $tempBuildPath
3537
}
3638

3739
Import-Module $ModulePath -Force

tools/benchmark/Invoke-ProfilerTrace.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ param(
2727
$ErrorActionPreference = 'Stop'
2828

2929
if (-not $ModulePath) {
30-
$ModulePath = & (Join-Path -Path $PSScriptRoot -ChildPath 'Build-LocalModule.ps1') -OutputPath (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'SodiumBench')
30+
$buildScript = Join-Path -Path $PSScriptRoot -ChildPath 'Build-LocalModule.ps1'
31+
$tempBuildPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'SodiumBench'
32+
$ModulePath = & $buildScript -OutputPath $tempBuildPath
3133
}
3234

3335
Import-Module Profiler

0 commit comments

Comments
 (0)