public ActionResult Stats()
 {
     return(this.Json(new
     {
         CPU = SelfPerfMonitor.GetCpuUsage(),
         RAM = SelfPerfMonitor.GetMemUsage()
     }, JsonRequestBehavior.AllowGet));
 }
Esempio n. 2
0
 public IActionResult OnGetStats()
 {
     return(new JsonResult(new
     {
         CPU = SelfPerfMonitor.GetCpuUsage(),
         RAM = SelfPerfMonitor.GetMemUsage()
     }, new System.Text.Json.JsonSerializerOptions()
     {
         PropertyNamingPolicy = null,
         Encoder =
             JavaScriptEncoder.Create(UnicodeRanges.BasicLatin, UnicodeRanges.CjkUnifiedIdeographs)
     }));
 }