public async Task GetVMPerformance()

in wvd-templates/diagnostics-sample/src/MSFT.WVD.Diagnostics/Controllers/DiagonizeIssuesController.cs [460:476]


        public async Task<VMPerformance> GetVMPerformance(string hostName)
        {
            var refreshToken = await HttpContext.GetTokenAsync("refresh_token").ConfigureAwait(false);
            var xDoc = HttpContext.Session.Get<XmlDocument>("LogAnalyticQuery");
            if (xDoc != null)
            {
                return await _logAnalyticsService.GetSessionHostPerformance(refreshToken, hostName, xDoc).ConfigureAwait(false);
            }
            else
            {
                string DirectoryNme = _hostingEnvironment.ContentRootPath;
                return new VMPerformance
                {
                    Message = $"VM performance queries file does not exist. Please upload 'metrics.xml' file to '{DirectoryNme}' ."
                };
            }
        }