Skip to content

Instantly share code, notes, and snippets.

@torgro
Created September 19, 2016 10:17
Show Gist options
  • Select an option

  • Save torgro/336edfa494c67fb2fc7d511db8a47cc2 to your computer and use it in GitHub Desktop.

Select an option

Save torgro/336edfa494c67fb2fc7d511db8a47cc2 to your computer and use it in GitHub Desktop.
$measureWhere = @()
foreach ($count in (0..10))
{
$id1 = $CollectionOfIDs | Get-Random
$id2 = $CollectionOfIDs | Get-Random
[gc]::Collect()
$measureWhere += Measure-Command -Expression {
$csvObjects.Where({$_.id -eq $id1 -or $_.id -eq $id2})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment