Skip to content

Instantly share code, notes, and snippets.

@Buthrakaur
Created December 4, 2015 15:10
Show Gist options
  • Save Buthrakaur/376e0c05729ac6969e93 to your computer and use it in GitHub Desktop.
Save Buthrakaur/376e0c05729ac6969e93 to your computer and use it in GitHub Desktop.
Simple load test tool in powershell
workflow PingUrlParallel {
param(
[string]$url,
[int]$parallelCount = 10,
[int]$iterations = 10
)
foreach -parallel ($x in 1..$parallelCount) {
1..$iterations | %{
$response = curl $url
$status = $response.StatusCode
"worker $x : iteration $_ : $status"
[System.Threading.Thread]::Sleep(500)
}
}
}
PingUrlParallel http://google.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment