LoadMemUsage

Has no parameters

Loads the current memory usage into the current Work Query. The fields used are as follows:


Rem 'Run a senario with init and post max memory usage tested
    [New] MaxMem.Init = Debug.MemUsage "Init Memory Usage"
    
    LoadTable   "Content.Category"
    Children    "Content.Post"
    
    [New] MaxMem.Post = Debug.MemUsage "Post Memory Usage"
    
    HtmlAlert   ("Init: " & MaxMem.Init & _
                "<‍br>Post: " & MaxMem.Post & _
                "<‍br>Diff: " & (Format$ (MaxMem.Post - MaxMem.Init), "#,"))
EndRem


Function Debug.MemUsage(pTitle)
    Rem 'Get our data
        LoadMemUsage
        [Pull]  "Me.Output", "Peak-Working-Set Peak-Page-File"
        If Peak-Working-Set >> Peak-Page-File
            [New] MaxMem = Peak-Working-Set
        Else
            [New] MaxMem = Peak-Page-File
        End If
    EndRem
    
    Rem 'Put it on the page
        HtmlBlock
            <div class="panel panel-default"><div class="panel-heading">
            <h3 class="panel-title">{{pTitle}}</h3></div>
                <div class="panel-body">
        End HtmlBlock
            HtmlTable
        HtmlBlock
                </div>
            </div>
        End HtmlBlock
    EndRem
    
    Return MaxMem
End Function