Example #1
0
        public async Task GetValues()
        {
            TodayValues = await client.DESERIALIZE <SysInfoModel>("Data/GetSysInfo/today");

            AllValues = await client.DESERIALIZE <SysInfoModel>("Data/GetSysInfo/all");

            AllValues.LongestQuery = AllValues.LongestQuery > 0 ? AllValues.LongestQuery / 1000 : 0;

            AllValues.AvgQueryLength = AllValues.AvgQueryLength > 0 ? AllValues.AvgQueryLength / 1000 : 0;
            OnInfoChangeAsync?.Invoke();
        }
Example #2
0
        public static async Task DrawBarsPctGraphs(this Canvas2DContext con, SysInfoModel m)
        {
            await con.DrawBar((int)m.AvgCPU, COLOR.Purple, 0, chartHeightPct);

            await con.DrawBar((int)m.HighestCPU, COLOR.DarkPurple, 30, chartHeightPct);

            await con.DrawBar((int)m.AvgMem, COLOR.Blue, 80, chartHeightPct);

            await con.DrawBar((int)m.HighestMem, COLOR.DarkBlue, 110, chartHeightPct);

            await con.DrawBar((int)m.AvgDiskWrite, COLOR.Green, 160, chartHeightPct);

            await con.DrawBar((int)m.HighestDiskWrite, COLOR.DarkGreen, 190, chartHeightPct);
        }