Skip to content

Commit

Permalink
looking at executionduration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel Tatschner authored and Nigel Tatschner committed May 14, 2024
1 parent 8220911 commit b9f7dec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ function Invoke-TelemetryCollection {

switch -Regex ($Stage) {
'Module-Load' {
if ((Get-Variable -Name 'GlobalExecutionDuration' -Scope script -ErrorAction SilentlyContinue) -and (-Not $ClearTimer)) {
if ((Get-Variable -Name "GlobalExecutionDuration_$ExecutionID" -Scope script -ErrorAction SilentlyContinue) -and (-Not $ClearTimer)) {
Set-Variable -Name "GlobalExecutionDuration_$ExecutionID" -Value $GlobalExecutionDuration -Scope script -Force | Out-Null
}
else {
New-Variable -Name "GlobalExecutionDuration_$ExecutionID" -Value $GlobalExecutionDuration -Scope script -Force | Out-Null
}
}
'Start' {
if ((Get-Variable -Name 'GlobalExecutionDuration' -Scope script -ErrorAction SilentlyContinue) -and (-Not $ClearTimer)) {
if ((Get-Variable -Name "GlobalExecutionDuration_$ExecutionID" -Scope script -ErrorAction SilentlyContinue) -and (-Not $ClearTimer)) {
Set-Variable -Name "GlobalExecutionDuration_$ExecutionID" -Value $GlobalExecutionDuration -Scope script -Force | Out-Null
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tatux.telemetry/tatux.telemetry.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '0.0.29'
ModuleVersion = '0.0.30'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down

0 comments on commit b9f7dec

Please sign in to comment.