Files
mtusi2026lab7/scripts/benchmark-argon2.ps1
T

22 lines
612 B
PowerShell

[CmdletBinding()]
param(
[string]$Image = 'eclipse-temurin:23-jdk'
)
$ErrorActionPreference = 'Stop'
$root = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
$arguments = @(
'run', '--rm',
'--cpus', '0.75',
'--memory', '768m',
'--mount', "type=bind,source=$root,target=/workspace",
'--mount', 'type=volume,source=hla-lab7-gradle-benchmark,target=/root/.gradle',
'--workdir', '/workspace',
'--entrypoint', '/bin/bash',
$Image,
'-c', 'bash ./gradlew argon2Benchmark --no-daemon --quiet'
)
& docker @arguments
if($LASTEXITCODE -ne 0){ throw 'Argon2id benchmark failed' }