< Back
Measure-These
Post
NAME Measure-These
SYNOPSIS
Svendsen Tech's Benchmarking Module for PowerShell.
Benchmark PowerShell script blocks and (virtually) any "DOS"/cmd.exe command
using this module built around PowerShell's Measure-Command cmdlet. It is designed
to give a quick, convenient overview of how code performs when doing for instance
the same thing in different ways.
MIT license.
SYNTAX
Measure-These [-Count] <Int32[]> [-ScriptBlock] <ScriptBlock[]> [[-Title] <String[]>] [[-Precision] <Byte>]
[<CommonParameters>]
DESCRIPTION
This is a benchmarking module for PowerShell. Get objects containing data about
the execution time of script blocks. Pipe to Format-Table -AutoSize
for a direct report. You can also assign the resulting objects to a variable (do not
use Format-Table when assigning to a variable).
GitHub link here: https://github.com/EliteLoser/Benchmark
PowerShell Gallery link here: https://www.powershellgallery.com/packages/Benchmark/
Also see the comprehensive online blog documentation at:
https://www.powershelladmin.com/wiki/Po ... re-Command
Copyright (c) 2012-present, Joakim Borger Svendsen. Svendsen Tech.
All rights reserved.
Author: Joakim Borger Svendsen
MIT license.
PARAMETERS
-Count <Int32[]>
Number of times to execute the code in each specified script block. Pass in
multiple counts separated by commas.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ScriptBlock <ScriptBlock[]>
Script block(s) to time the execution time of and collect data about.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Title <String[]>
Optional titles for each script block. Title 1 goes with block 1,
2 with 2, and so on. If you omit titles, you will get numbered
script blocks (from left to right). If you have fewer titles than
script blocks, you will get numbers when you "run out of titles".
Required? false
Position? 3
Default value @('')
Accept pipeline input? false
Accept wildcard characters? false
-Precision <Byte>
Specify number of digits after the decimal separator. Default 5. Maximum 15.
Trailing zeroes are removed by the [Math]::Round() static function.
Required? false
Position? 4
Default value 5
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
RELATED LINKS
SYNOPSIS
Svendsen Tech's Benchmarking Module for PowerShell.
Benchmark PowerShell script blocks and (virtually) any "DOS"/cmd.exe command
using this module built around PowerShell's Measure-Command cmdlet. It is designed
to give a quick, convenient overview of how code performs when doing for instance
the same thing in different ways.
MIT license.
SYNTAX
Measure-These [-Count] <Int32[]> [-ScriptBlock] <ScriptBlock[]> [[-Title] <String[]>] [[-Precision] <Byte>]
[<CommonParameters>]
DESCRIPTION
This is a benchmarking module for PowerShell. Get objects containing data about
the execution time of script blocks. Pipe to Format-Table -AutoSize
for a direct report. You can also assign the resulting objects to a variable (do not
use Format-Table when assigning to a variable).
GitHub link here: https://github.com/EliteLoser/Benchmark
PowerShell Gallery link here: https://www.powershellgallery.com/packages/Benchmark/
Also see the comprehensive online blog documentation at:
https://www.powershelladmin.com/wiki/Po ... re-Command
Copyright (c) 2012-present, Joakim Borger Svendsen. Svendsen Tech.
All rights reserved.
Author: Joakim Borger Svendsen
MIT license.
PARAMETERS
-Count <Int32[]>
Number of times to execute the code in each specified script block. Pass in
multiple counts separated by commas.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ScriptBlock <ScriptBlock[]>
Script block(s) to time the execution time of and collect data about.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Title <String[]>
Optional titles for each script block. Title 1 goes with block 1,
2 with 2, and so on. If you omit titles, you will get numbered
script blocks (from left to right). If you have fewer titles than
script blocks, you will get numbers when you "run out of titles".
Required? false
Position? 3
Default value @('')
Accept pipeline input? false
Accept wildcard characters? false
-Precision <Byte>
Specify number of digits after the decimal separator. Default 5. Maximum 15.
Trailing zeroes are removed by the [Math]::Round() static function.
Required? false
Position? 4
Default value 5
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
RELATED LINKS