示例#1
0
        public MonitorDB(string server)
        {
            IStatistic st = DataAccess.CreateStatistic(server);

            CurrentParameter      = st.GetParameter();
            ParameterSessionValue = st.GetParameterSession();
            ParameterProcessValue = st.GetParameterProcess();
            CurrentSession        = st.StatisticSession();
            CurrentProcess        = st.StatisticProcess();
            TotalSession          = st.TotalStatisticSession();
            TotalProcess          = st.TotalStatisticProcess();

            CurrentMONITOR_DB = st.QueryMONITOR_DB();
            MaxSessionValue   = st.GetMaxSessionValue();
            MaxProcessValue   = st.GetMaxProcessValue();

            MaxSessionPercent = Math.Round(100 * MaxSessionValue / ParameterSessionValue, 2);
            MaxProcessPercent = Math.Round(100 * MaxProcessValue / ParameterProcessValue, 2);
        }