mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Fixes code styling for New-IcingaPerformanceCounterArray
This commit is contained in:
parent
3e5a97d52b
commit
9ece8d805f
1 changed files with 64 additions and 57 deletions
|
|
@ -12,8 +12,8 @@
|
|||
'\Memory\% Committed Bytes In Use'
|
||||
);
|
||||
#>
|
||||
function New-IcingaPerformanceCounterArray()
|
||||
{
|
||||
function New-IcingaPerformanceCounterArray()
|
||||
{
|
||||
param(
|
||||
[array]$CounterArray = @()
|
||||
)
|
||||
|
|
@ -39,6 +39,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
# TODO: Add a cache for our Performance Counters to only fetch them once
|
||||
# for each session to speed up the loading. This cold be something like
|
||||
# this:
|
||||
# New-IcingaPerformanceCounterCache $CounterResult;
|
||||
# Internally we could do something like this
|
||||
# $global:Icinga_PerfCounterCache += $CounterResult;
|
||||
|
||||
# Above we initialse ever single counter and we only require a sleep once
|
||||
# in case a new, yet unknown counter was added
|
||||
if ($RequireSleep) {
|
||||
|
|
@ -68,4 +75,4 @@
|
|||
}
|
||||
|
||||
return $CounterResult;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue