Profile.psm1

<#
VM Fleet
 
Copyright(c) Microsoft Corporation
All rights reserved.
 
MIT License
 
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
 
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
#>


#
# Template Profiles
#
# Template profiles state througput in relative units per target per timespan.
# If a timespan contains two targets, one with 1 relative IOPS and one with 9
# relative IOPS, applying an aggregate IOPS throughput of 100 would result in
# 10 & 90 respectively.
#
# Throughput MUST be in template in order to apply throughput limits.
#

# Note: random/stridesize elements MUST be removed if -Random will be allowed for
# a profile.

#
# Peak/General: a single thread high-QD unbuffered/writethrough single target template
# with latency/iops measured. 10MiB random write data source. All substitutions
# allowed.
#
# Peak and General differ in distribution. General is across a non-uniform distribution
# of the entire available workingset, while Peak has no built-in distribution. This allows
# Peak to be instantiated with a reduced workingset (-BaseOffset/-MaxOffset) for a uniformly
# loaded small workingset.
#
#
# Derived from: -t1 -b4k -o32 -w0 -r -Suw -D -L -Z10m *1
# Random element removed, also BaseFileOffset/MaxFileSize
# Profile specific required parameters override WriteRatio, BlockSize
#

$PeakProfile = @"
<Profile>
  <Progress>0</Progress>
  <ResultFormat>xml</ResultFormat>
  <Verbose>false</Verbose>
  <TimeSpans>
    <TimeSpan>
      <CompletionRoutines>false</CompletionRoutines>
      <MeasureLatency>true</MeasureLatency>
      <CalculateIopsStdDev>true</CalculateIopsStdDev>
      <DisableAffinity>false</DisableAffinity>
      <Duration></Duration>
      <Warmup></Warmup>
      <Cooldown></Cooldown>
      <IoBucketDuration>1000</IoBucketDuration>
      <RandSeed>0</RandSeed>
      <Targets>
        <Target>
          <Path>*1</Path>
          <BlockSize>4096</BlockSize>
          <DisableOSCache>true</DisableOSCache>
          <WriteThrough>true</WriteThrough>
          <WriteBufferContent>
            <Pattern>random</Pattern>
            <RandomDataSource>
              <SizeInBytes>10485760</SizeInBytes>
            </RandomDataSource>
          </WriteBufferContent>
          <ThreadStride>0</ThreadStride>
          <RequestCount>32</RequestCount>
          <WriteRatio>0</WriteRatio>
          <Throughput>0</Throughput>
          <ThreadsPerFile>1</ThreadsPerFile>
          <IOPriority>3</IOPriority>
        </Target>
      </Targets>
    </TimeSpan>
  </TimeSpans>
</Profile>
"@


$GeneralProfile = @"
<Profile>
  <Progress>0</Progress>
  <ResultFormat>xml</ResultFormat>
  <Verbose>false</Verbose>
  <TimeSpans>
    <TimeSpan>
      <CompletionRoutines>false</CompletionRoutines>
      <MeasureLatency>true</MeasureLatency>
      <CalculateIopsStdDev>true</CalculateIopsStdDev>
      <DisableAffinity>false</DisableAffinity>
      <Duration></Duration>
      <Warmup></Warmup>
      <Cooldown></Cooldown>
      <IoBucketDuration>1000</IoBucketDuration>
      <RandSeed>0</RandSeed>
      <Targets>
        <Target>
          <Path>*1</Path>
          <BlockSize>4096</BlockSize>
          <DisableOSCache>true</DisableOSCache>
          <WriteThrough>true</WriteThrough>
          <WriteBufferContent>
            <Pattern>random</Pattern>
            <RandomDataSource>
              <SizeInBytes>10485760</SizeInBytes>
            </RandomDataSource>
          </WriteBufferContent>
          <Distribution>
            <Percent>
              <Range IO="95">5</Range>
              <Range IO="4">10</Range>
            </Percent>
          </Distribution>
          <ThreadStride>0</ThreadStride>
          <RequestCount>32</RequestCount>
          <WriteRatio>0</WriteRatio>
          <Throughput>0</Throughput>
          <ThreadsPerFile>1</ThreadsPerFile>
          <IOPriority>3</IOPriority>
        </Target>
      </Targets>
    </TimeSpan>
  </TimeSpans>
</Profile>
"@


# VDI Profile: DiskSpd parameters that mimic a VDI workload
#
# Derived from:
# (write component) -t1 -o8 -b32k -w100 -g6i -rs20 -rdpct95/5:4/10 -Z10m -f10g *1
# (read component) -t1 -o8 -b8k -w0 -g6i -rs80 -rdpct95/5:4/10 -f8g *1


$VDIProfile = @"
<Profile>
  <Progress>0</Progress>
  <ResultFormat>xml</ResultFormat>
  <Verbose>false</Verbose>
  <TimeSpans>
    <TimeSpan>
      <CompletionRoutines>false</CompletionRoutines>
      <MeasureLatency>true</MeasureLatency>
      <CalculateIopsStdDev>true</CalculateIopsStdDev>
      <DisableAffinity>false</DisableAffinity>
      <Duration></Duration>
      <Warmup></Warmup>
      <Cooldown>0</Cooldown>
      <IoBucketDuration>1000</IoBucketDuration>
      <RandSeed>0</RandSeed>
      <Targets>
        <Target>
          <Path>*1</Path>
          <BlockSize>32768</BlockSize>
          <BaseFileOffset>0</BaseFileOffset>
          <MaxFileSize>10737418240</MaxFileSize>
          <DisableOSCache>true</DisableOSCache>
          <WriteThrough>true</WriteThrough>
          <WriteBufferContent>
            <Pattern>random</Pattern>
            <RandomDataSource>
              <SizeInBytes>10485760</SizeInBytes>
            </RandomDataSource>
          </WriteBufferContent>
          <Random>32768</Random>
          <RandomRatio>20</RandomRatio>
          <Distribution>
            <Percent>
              <Range IO="95">5</Range>
              <Range IO="4">10</Range>
            </Percent>
          </Distribution>
          <ThreadStride>0</ThreadStride>
          <RequestCount>8</RequestCount>
          <WriteRatio>100</WriteRatio>
          <Throughput unit="IOPS">6</Throughput>
          <ThreadsPerFile>1</ThreadsPerFile>
          <IOPriority>3</IOPriority>
        </Target>
        <Target>
          <Path>*1</Path>
          <BlockSize>8192</BlockSize>
          <BaseFileOffset>0</BaseFileOffset>
          <MaxFileSize>8589934592</MaxFileSize>
          <DisableOSCache>true</DisableOSCache>
          <WriteThrough>true</WriteThrough>
          <WriteBufferContent>
            <Pattern>sequential</Pattern>
          </WriteBufferContent>
          <Random>8192</Random>
          <RandomRatio>80</RandomRatio>
          <Distribution>
            <Percent>
              <Range IO="95">5</Range>
              <Range IO="4">10</Range>
            </Percent>
          </Distribution>
          <ThreadStride>0</ThreadStride>
          <RequestCount>8</RequestCount>
          <WriteRatio>0</WriteRatio>
          <Throughput unit="IOPS">6</Throughput>
          <ThreadsPerFile>1</ThreadsPerFile>
          <IOPriority>3</IOPriority>
        </Target>
      </Targets>
    </TimeSpan>
  </TimeSpans>
</Profile>
"@


# SQL Profile: DiskSpd parameters that mimic an SQL workload with log transaction
#
# Derived from:
# (OLTP) -t4 -o32 -r -b8k -g1500i -w30 -rdpct95/5:4/10 -B5g -Z10m *1
# (Log) -t1 -o1 -s -b32k -g300i -w100 -f5g -Z10m *1

$SQLProfile = @"
<Profile>
  <Progress>0</Progress>
  <ResultFormat>xml</ResultFormat>
  <Verbose>false</Verbose>
  <TimeSpans>
    <TimeSpan>
      <CompletionRoutines>false</CompletionRoutines>
      <MeasureLatency>true</MeasureLatency>
      <CalculateIopsStdDev>true</CalculateIopsStdDev>
      <DisableAffinity>false</DisableAffinity>
      <Duration></Duration>
      <Warmup></Warmup>
      <Cooldown></Cooldown>
      <IoBucketDuration>1000</IoBucketDuration>
      <RandSeed>0</RandSeed>
      <Targets>
        <Target>
          <Path>*1</Path>
          <BlockSize>8192</BlockSize>
          <BaseFileOffset>5368709120</BaseFileOffset>
          <MaxFileSize>0</MaxFileSize>
          <DisableOSCache>true</DisableOSCache>
          <WriteThrough>true</WriteThrough>
          <WriteBufferContent>
            <Pattern>random</Pattern>
            <RandomDataSource>
              <SizeInBytes>10485760</SizeInBytes>
            </RandomDataSource>
          </WriteBufferContent>
          <Random>8192</Random>
          <Distribution>
            <Percent>
              <Range IO="95">5</Range>
              <Range IO="4">10</Range>
            </Percent>
          </Distribution>
          <ThreadStride>0</ThreadStride>
          <RequestCount>32</RequestCount>
          <WriteRatio>30</WriteRatio>
          <Throughput unit="IOPS">1500</Throughput>
          <ThreadsPerFile>4</ThreadsPerFile>
          <IOPriority>3</IOPriority>
        </Target>
        <Target>
          <Path>*1</Path>
          <BlockSize>32768</BlockSize>
          <BaseFileOffset>0</BaseFileOffset>
          <MaxFileSize>5368709120</MaxFileSize>
          <DisableOSCache>true</DisableOSCache>
          <WriteThrough>true</WriteThrough>
          <WriteBufferContent>
            <Pattern>random</Pattern>
            <RandomDataSource>
              <SizeInBytes>10485760</SizeInBytes>
            </RandomDataSource>
          </WriteBufferContent>
          <StrideSize>32768</StrideSize>
          <ThreadStride>0</ThreadStride>
          <RequestCount>1</RequestCount>
          <WriteRatio>100</WriteRatio>
          <Throughput unit="IOPS">300</Throughput>
          <ThreadsPerFile>1</ThreadsPerFile>
          <IOPriority>3</IOPriority>
        </Target>
      </Targets>
    </TimeSpan>
  </TimeSpans>
</Profile>
"@


#
# Requires - parameters which must be provided
# AllowsRandSeq - compatibility with -Random/-Sequential rewrite rule
# Compatibility - list of parameters for compatibility check
# Compatible - provides sense of the Compatibility list for simpler bulk inclusion/exclusion
# true - an inclusion list; parameters not mentioned are not allowed (empty = none allowed)
# false - an exclusion list; parameters mentioned are not allowed (empty = all allowed)
#

$FleetProfiles = @{
    Peak = @{
        Profile = $PeakProfile
        AllowRandSeq = $true
        Requires = @('WriteRatio', 'BlockSize')
        Compatibility = $null
        Compatible = $false
    }

    General = @{
        Profile = $GeneralProfile
        AllowRandSeq = $true
        Requires = @('WriteRatio', 'BlockSize')
        Compatibility = $null
        Compatible = $false
    }

    VDI = @{
        Profile = $VDIProfile
        AllowRandSeq = $false
        Requires = $null
        Compatibility = $null
        Compatible = $true
    }

    SQL = @{
        Profile = $SQLProfile
        AllowRandSeq = $false
        Requires = $null
        Compatibility = $null
        Compatible = $true
    }
}

function Get-FleetProfileXml
{
    [CmdletBinding()]
    param(
        [Parameter()]
        [string]
        $Name,

        [Parameter()]
        [uint32]
        $Warmup = 300,

        [Parameter()]
        [uint32]
        $Duration = 60,

        [Parameter()]
        [uint32]
        $Cooldown = 30,

        [ValidateRange(0, 100)]
        [uint32]
        $WriteRatio,

        [Parameter()]
        [uint32]
        $ThreadsPerTarget,

        [Parameter()]
        [uint32]
        $BlockSize,

        [Parameter()]
        [uint32]
        $Alignment,

        [Parameter()]
        [switch]
        $Random,

        [Parameter()]
        [switch]
        $Sequential,

        [ValidateRange(0, 100)]
        [uint32]
        $RandomRatio,

        [Parameter()]
        [uint32]
        $RequestCount,

        [Parameter()]
        [uint64]
        $ThreadStride,

        [Parameter()]
        [uint64]
        $BaseOffset,

        [Parameter()]
        [uint64]
        $MaxOffset,

        [Parameter()]
        [ValidateRange(1,60)]
        [uint32]
        $IoBucketDurationSeconds
    )

    $x = $null

    #
    # Get base profile and validate profile-specific paramters
    #

    if (-not $PSBoundParameters.ContainsKey('Name'))
    {
        Write-Error "Available profiles: $(@($FleetProfiles.Keys | Sort-Object) -join ', ')"
        return
    }
    elseif (-not $FleetProfiles.ContainsKey($Name))
    {
        Write-Error "Unknown profile $Name; available: $(@($FleetProfiles.Keys | Sort-Object) -join ', ')"
        return
    }

    #
    # Switch validation
    #

    if ($PsBoundParameters.ContainsKey('Sequential') -and $PsBoundParameters.ContainsKey('Random'))
    {
        Write-Error "Random and Sequential cannot be specified together"
        return
    }

    #
    # Requires check
    #

    $err = @()
    foreach ($arg in $FleetProfiles[$Name].Requires)
    {
        if (-not $PSBoundParameters.ContainsKey($arg))
        {
            $err += ,$arg
        }
    }

    if ($err.Count)
    {
        Write-Error "$Name profile requires specification of $($err -join ', ')"
        return
    }

    #
    # Incompatible check
    #

    if (-not ($FleetProfiles[$Name].Compatible))
    {
        foreach ($arg in $FleetProfiles[$Name].Compatibility)
        {
            if ($PSBoundParameters.ContainsKey($arg))
            {
                $err += ,$arg
            }
        }
    }

    #
    # Compatible check
    #

    else
    {
        # Always-on core parameters + required list + compatible list
        $baseParameters = @('Name', 'Warmup', 'Duration', 'Cooldown')

        foreach ($arg in $PSBoundParameters.Keys)
        {
            if ($baseParameters -notcontains $arg -and
                $FleetProfiles[$Name].Requires -notcontains $arg -and
                $FleetProfiles[$Name].Compatibility -notcontains $arg)
            {
                $err += ,$arg
            }
        }
    }

    if ($err.Count)
    {
        Write-Error "$Name profile does not allow specification of $($err -join ', ')"
        return
    }

    #
    # Now load/modify profile.
    #

    $x = [xml] $FleetProfiles[$Name].Profile

    #
    # Perform replacements @ TimeSpan
    #

    foreach ($timeSpan in $x.SelectNodes("Profile/TimeSpans/TimeSpan"))
    {
        $timeSpan.Warmup = [string] $Warmup
        $timeSpan.Duration = [string] $Duration
        $timeSpan.Cooldown = [string] $Cooldown

        if ($PSBoundParameters.ContainsKey('IoBucketDurationSeconds'))
        {
            $timeSpan.IoBucketDuration = [string] ($IoBucketDurationSeconds * 1000)
        }

        # Autoscale to best clock fit >1000 n-second IOPS bucket datapoints.
        else
        {
            $timeSpan.IoBucketDuration = [string] ((FitClockRate -TotalSeconds $Duration -Samples 1000) * 1000)
        }
    }

    #
    # Perform replacements @ Target
    #

    foreach ($targetSet in $x.SelectNodes("Profile/TimeSpans/TimeSpan/Targets"))
    {
        $targets = $targetSet.SelectNodes("Target")

        foreach ($target in $targets)
        {
            #
            # 1:1 Common Substitutions
            #

            $TargetSubstitutions = @{
                BlockSize = 'BlockSize'
                RequestCount = 'RequestCount'
                ThreadsPerTarget = 'ThreadsPerFile'
                ThreadStride = 'ThreadStride'
                WriteRatio = 'WriteRatio'
                MaxOffset = 'MaxFileSize'
                BaseOffset = 'BaseFileOffset'
            }

            foreach ($s in $TargetSubstitutions.Keys)
            {
                if ($PSBoundParameters.ContainsKey($s))
                {
                    SetSingleNode -Xml $x -ParentNode $target -Node $TargetSubstitutions[$s] -Value ([string] $PSBoundParameters[$s])
                }
            }

            #
            # Target Random/Sequential/Alignment
            #

            if ($FleetProfiles[$Name].AllowRandSeq)
            {
                # Inherit default buffer alignment from buffer size
                if (-not $PSBoundParameters.ContainsKey('Alignment'))
                {
                    $Alignment = $BlockSize
                }

                # Random or RandomRatio
                if ($Random -or $PsBoundParameters.ContainsKey('RandomRatio'))
                {
                    $e = $x.CreateNode([xml.xmlnodetype]::Element, 'Random', '')
                    $e.InnerText = [string] $Alignment
                    $null = $target.AppendChild($e)

                    if ($PsBoundParameters.ContainsKey('RandomRatio'))
                    {
                        $e = $x.CreateNode([xml.xmlnodetype]::Element, 'RandomRatio', '')
                        $e.InnerText = [string] $RandomRatio
                        $null = $target.AppendChild($e)
                    }
                }

                # Sequential (default if neither specified)
                elseif ($Sequential -or -not $Random)
                {
                    $e = $x.CreateNode([xml.xmlnodetype]::Element, 'StrideSize', '')
                    $e.InnerText = [string] $Alignment
                    $null = $target.AppendChild($e)

                    #
                    # Remove any distribution attached to the target - not compatibile (or relevant);
                    # sequential is sequential.
                    #

                    $dists = $target.SelectNodes("Distribution")
                    foreach ($dist in $dists)
                    {
                        $null = $target.RemoveChild($dist)
                    }
                }
            }
        }
    }

    $x
}

function Set-FleetProfile
{
    [CmdletBinding()]
    param(
        [Parameter(ValueFromPipeline = $true, Mandatory = $true)]
        [xml]
        $ProfileXml,

        [Parameter()]
        [uint32]
        $Throughput,

        [Parameter()]
        [ValidateSet("IOPS","BPMS")]
        [string]
        $ThroughputUnit = "IOPS",

        [Parameter()]
        [uint32]
        $Warmup,

        [Parameter()]
        [uint32]
        $Duration,

        [Parameter()]
        [uint32]
        $Cooldown
    )

    process
    {
        $x = $ProfileXml.Clone()

        foreach ($timeSpan in $x.SelectNodes("Profile/TimeSpans/TimeSpan"))
        {
            if ($PSBoundParameters.ContainsKey('Warmup'))
            {
                $timeSpan.Warmup = [string] $Warmup
            }

            if ($PSBoundParameters.ContainsKey('Cooldown'))
            {
                $timeSpan.Cooldown = [string] $Cooldown
            }

            if ($PSBoundParameters.ContainsKey('Duration'))
            {
                $timeSpan.Duration = [string] $Duration
            }

            if ($PSBoundParameters.ContainsKey('Throughput'))
            {
                # Fail if timespan is in threadpool form - DISKSPD does not support
                # throughput in this case.

                $t = $timeSpan.SelectSingleNode("ThreadCount")
                if ($null -ne $t -and $t.InnerText -ne 0)
                {
                    throw "Cannot set bounded throughput on profile using thread pool (-F/TimeSpan ThreadCount)"
                }

                foreach ($targetSet in $timeSpan.SelectNodes("Targets"))
                {
                    #
                    # Pass 1 - Total
                    #

                    $total = [uint32] 0
                    $nTargets = 0
                    foreach ($target in $targetSet.Target)
                    {
                        $thisTput = 0
                        $e = $target.SelectSingleNode("Throughput")
                        if ($null -ne $e)
                        {
                            $thisTput = [uint32] $e.InnerText

                            $e = $target.SelectSingleNode("ThreadsPerFile")
                            if ($null -eq $e -or ([uint32] $e.InnerText) -eq 0)
                            {
                                throw "ThreadsPerFile is not present - zero or absent - to scale Throughput (target $nTargets)"
                            }

                            $thisTput *= [uint32] $e.InnerText
                        }

                        if (($total -ne 0 -and $thisTput -eq 0) -or
                            ($total -eq 0 -and $thisTput -ne 0 -and $nTargets -ne 0))
                        {
                            throw "Cannot set throughput on profile with a combination of bounded/unbounded targets (target $nTargets)"
                        }

                        $total += $thisTput
                        ++$nTargets
                    }

                    # If there is no throughout specified (unbounded) and no ratio specified
                    # in the profile, we are done - already unbounded.

                    if ($Throughput -eq 0 -and $total -eq 0) { continue }

                    #
                    # Pass 2a - Distribute nonzero by ratio, as well as zero to single target
                    #

                    if ($Throughput -ne 0 -or $targets.Count -eq 1)
                    {
                        foreach ($target in $targetSet.Target)
                        {

                            # Distribute equally
                            if ($total -eq 0)
                            {
                                SetSingleNode -Xml $x -ParentNode $target -Node 'Throughput' -Value ([int] ($Throughput / $nTargets))
                                $e = $target.SelectSingleNode("Throughput")
                            }

                            # Distribute proportionally
                            # Note: in absolute terms the numerator $thisTput should be scaled by #threads to arrive at
                            # a fraction the new throughput, but then we would immediatly divide #threads out of the result
                            # to arrive at per thread throughput; this can be avoided.
                            else
                            {
                                $e = $target.SelectSingleNode("Throughput")
                                $thisTput = [uint32] $e.InnerText
                                $e.InnerText = [string] [int] ($Throughput * ($thisTput / $total))
                            }

                            $e.SetAttribute('unit', $ThroughputUnit)
                        }
                    }

                    # Pass 2b - Distribute "zero" across multiple by converting target threads to pool
                    # with weighted ratio of throughputs on targets. Set interlocked sequential
                    # on sequential targets unless a nonzero threadstride is already present.
                    # This can result in a close approximation of unbounded result on the tput
                    # limited specification without needing dynamic scale-up, but should be used
                    # with caution.
                    else
                    {
                        # Loop targets to count threads, move tputs to weights and set interlocked sequential.

                        $nThreads = 0
                        foreach ($target in $targetSet.Target)
                        {
                            # Count threads
                            $e = $target.SelectSingleNode("ThreadsPerFile")
                            if ($null -eq $e -or $e.InnerText -eq 0)
                            {
                                throw "Invalid -t/ThreadsPerFile specification (absent or zero) converting to unbounded form"
                            }
                            $thisThreads = [uint32] $e.InnerText
                            $nThreads += $thisThreads

                            # Remove ThreadsPerFile/RequestCount @ Target
                            $null = $target.RemoveChild($e)
                            $e = $target.SelectSingleNode("RequestCount")
                            if ($null -ne $e) { $null = $target.RemoveChild($e) }

                            # Move Throuhput to Weight. Note - Throughput guaranteed to exist or we would have
                            # returned at the 0/0 check. Weight scales by number of threads on the target.
                            $e = $target.SelectSingleNode("Throughput")
                            $thisTput = [uint32] $e.InnerText
                            $null = $target.RemoveChild($e)

                            SetSingleNode -Xml $x -ParentNode $target -Node 'Weight' -Value ($thisTput * $thisThreads)

                            # Sequential target without ThreadStride? Move to interlocked.
                            $e = $target.SelectSingleNode("StrideSize")
                            if ($null -ne $e)
                            {
                                $e = $target.SelectSingleNode("ThreadStride")
                                if ($null -eq $e -or $e.InnerText -eq 0)
                                {
                                    SetSingleNode -Xml $x -ParentNode $target -Node 'InterlockedSequential' -Value 'true'
                                }
                            }
                        }

                        # Now set TimeSpan level thread pool with high request count

                        SetSingleNode -Xml $x -ParentNode $timeSpan -Node 'ThreadCount' -Value $nThreads
                        SetSingleNode -Xml $x -ParentNode $timeSpan -Node 'RequestCount' -Value 32
                    }
                }
            }
        }

        $x
    }
}
function GetFleetProfileFootprint
{
    [CmdletBinding()]
    param(
        [Parameter(ValueFromPipeline = $true, Mandatory = $true)]
        [xml]
        $ProfileXml,

        [Parameter()]
        [switch]
        $Read
        )

    $r = @{}

    # Capture min base offset and max max offset across timespans for each target.
    # Note that 0 max offset indicates it is not bounded (bounded by target size).

    foreach ($target in $ProfileXml.SelectNodes("Profile/TimeSpans/TimeSpan/Targets/Target"))
    {
        # Skip write-only target specs if only interested in read workingset
        if ($Read -and $target.WriteRatio -eq '100')
        {
            continue
        }

        $bo = [uint64](GetSingleNode $target 'BaseFileOffset')
        $mo = [uint64](GetSingleNode $target 'MaxFileSize')

        $node = $r[$target.Path]

        if ($null -ne $node)
        {
            if ($node.BaseOffset -gt $bo)
            {
                $r[$target.Path].BaseOffset = $bo
            }

            if ($mo -eq 0)
            {
                $r[$target.Path].MaxOffset = 0
            }
            elseif ($node.MaxOffset -ne 0 -and $node.MaxOffset -lt $mo)
            {
                $r[$target.Path].MaxOffset = $mo
            }
        }
        else
        {
            $r[$target.Path] = [pscustomobject] @{
                BaseOffset = $bo
                MaxOffset = $mo
            }
        }
    }

    $r
}

function Convert-FleetXmlToString
{
    [CmdletBinding()]
    param(
        [Parameter(ValueFromPipeline = $true, Mandatory = $true)]
        [object]
        $InputObject
    )

    process {

        switch ($InputObject.GetType().FullName)
        {
            "System.Xml.XmlDocument"    { break }
            "System.Xml.XmlElement"     { break }
            default {
                throw "Unknown object type $_ - must be XmlDocument or XmlElement"
            }
        }

        $sw = [System.IO.StringWriter]::new()
        $xo = [System.Xml.XmlTextWriter]::new($sw)
        $xo.Formatting = [System.Xml.Formatting]::Indented

        $InputObject.WriteTo($xo)
        $sw.ToString()
    }
}

function FitClockRate
{
    param(
        [ValidateRange(1,(1000*60*60))]
        [uint32]
        $TotalSeconds,

        [uint32]
        $Samples
        )

    # Perform a best-fit for the longest interval which produces at least $Samples over
    # the given $TotalSeconds time period and evenly divide minutes/hours. E.g.:
    # 1..60 |? { 60 % $_ -eq 0 })
    #
    # Range is sanity capped at 1000h.

    $div = 1,2,3,4,5,6,10,12,15,20,30,60
    $last = 1

    # First multiple is seconds, second produces minutes.

    foreach ($mul in (1,60))
    {
        foreach ($d in $div)
        {
            # Skip 60s and roll over to 1 minute.
            # 60 is only used for minutes. (e.g., 1hr)
            if ($mul -eq 1 -and $d -eq 60 ) { break }

            if (($TotalSeconds / ($d * $mul)) -lt $Samples)
            {
                return $last
            }

            $last = $d * $mul
        }
    }

    return $last
}
function SetSingleNode
{
    param(
        [xml]
        $Xml,

        [xml.xmlelement]
        $ParentNode,

        [string]
        $Node,

        [string]
        $Value
    )

    # Set/Create child node to given value

    $e = $ParentNode.SelectSingleNode($Node)
    if ($null -ne $e)
    {
        $e.InnerText = $Value
    }
    else
    {
        $e = $Xml.CreateNode([xml.xmlnodetype]::Element, $Node, '')
        $e.InnerText = $Value
        $null = $ParentNode.AppendChild($e)
    }
}

function GetSingleNode
{
    param(
        [xml.xmlelement]
        $ParentNode,

        [string]
        $Node
    )

    # Gete child node, if present

    $e = $ParentNode.SelectSingleNode($Node)
    if ($null -ne $e)
    {
        return $e.InnerText
    }

    return $null
}

function IsProfileSingleTimespan
{
    param(
        [xml]
        $ProfileXml
    )

    $ts = @($ProfileXml.SelectNodes("Profile/TimeSpans/TimeSpan"))
    return ($ts.Count -eq 1)
}

function IsProfileThroughputLimited
{
    param(
        [xml]
        $ProfileXml
    )

    $tputs = @($ProfileXml.SelectNodes("Profile/TimeSpans/TimeSpan/Targets/Target/Throughput"))

    foreach ($t in $tputs)
    {
        if (([uint32]$t.InnerText) -ne 0)
        {
            return $true
        }
    }

    return $false
}

function IsProfileSingleTarget
{
    param(
        [xml]
        $ProfileXml
    )

    $tgts = @($ProfileXml.SelectNodes("Profile/TimeSpans/TimeSpan/Targets/Target"))
    return ($tgts.Count -eq 1)
}
# SIG # Begin signature block
# MIIg7AYJKoZIhvcNAQcCoI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