Skip to content

Instantly share code, notes, and snippets.

View wmcneill's full-sized avatar
💭
I may be slow to respond.

wmcneill

💭
I may be slow to respond.
View GitHub Profile
@sean-m
sean-m / TimeKeeper.ps1
Last active June 30, 2025 16:35
Helper classes for performance instrumentation in PowerShell scripts. This is not the start and end of performance analysis of scripts, I'm not even saying it's good, it is as consistent and low overhead as I have the energy to make it right now and has helped troubleshoot a real problem at work.
#!/usr/bin/pwsh
#Requires -Version 5
#region TimeKeeper
################################################################################
## TimeKeeper ##
################################################################################
<#
This a set of helper functions for logging overlapping timeslices in regions
of your code. BeginFunctionTick, EndFunctionTick, New-TimeKeeper and