From 0ce734e8c93158722e80998108c49f320ac973d5 Mon Sep 17 00:00:00 2001 From: KevinMarquette Date: Sun, 5 Feb 2017 15:06:45 -0800 Subject: [PATCH] updated readme --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 791061f..540fa0f 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,35 @@ A module for measuring performance of Powershell scripts, one line at a time ## Project status -Experimental. Just a working idea at the moment. Functions and argument names are still up in the air. Also don't consider it stable or tested. Use at your own risk. +Preview release. The core logic is fleshed out but more testing is needed. # Getting started ## Prerequirements You need to have Powershell 5.0 or newer. This module uses classes. ## Installing Chronometer -Place the Chronometer folder into your `$PSModulePath`. I will publish to the Powershell Gallery once the project is more stable. +This is published in the Powershell Gallery + + Install-Module Chronometer ## Basic usage Provide a script file and a command to execute. $path = myscript.ps1 $Chronometer = Get-Chronometer -Path $path -Script {. .\myscript.ps1} - $Chronometer | % tostring | Format-Chronometer + $Chronometer | Format-Chronometer -The user experience is important to me but I am working on the core logic right now. I will loop back to make it more intuitive and simple to use. ## Things to know The `Path` can be any ps1 and the script can run any command. Ideally, you would either execute the script or load the script and execute a command inside it. +Here is a more complex example: + + $script = ls C:\workspace\PSGraph\PSGraph -Recurse -Filter *.ps1 + $Chronometer = @{ + Path = $script.fullname + Script = {Invoke-Pester C:\workspace\PSGraph} + } + $results = Get-Chronometer @Chronometer + $results | Format-Chronometer +