Example #1
0
        /// <summary>
        /// 接收一条审计记录
        /// </summary>
        /// <param name="?"></param>
        public void Push(AuditBusiness ab)
        {
            String serviceName = ab.ServiceName;

            ServiceMonitor[]     serviceMonitorArray;
            MonitorStatDimension msDimension = GetMonitorStatDimension(ab);

            //--如果统计中没有相应维度的数据,则创建
            if (msDimension == null)
            {
                serviceMonitorArray = new ServiceMonitor[60];
                msDimension         = new MonitorStatDimension()
                {
                    ServiceName    = ab.ServiceName,
                    BindingAddress = ab.BindingAddress,
                    MethodName     = ab.RowMethodName
                };
                m_ServiceMonitor.Add(msDimension, serviceMonitorArray);
            }
            else
            {
                serviceMonitorArray = m_ServiceMonitor[msDimension];
            }

            RecordItem(ab, serviceMonitorArray);
        }
Example #2
0
        /// <summary>
        /// 接收一条审计记录
        /// </summary>
        /// <param name="?"></param>
        public void Push(AuditBusiness ab)
        {
            String serviceName = ab.ServiceName;
            ServiceMonitor[] serviceMonitorArray;
            MonitorStatDimension msDimension = GetMonitorStatDimension(ab);

            //--如果统计中没有相应维度的数据,则创建
            if (msDimension == null)
            {
                serviceMonitorArray = new ServiceMonitor[60];
                msDimension = new MonitorStatDimension()
                {
                    ServiceName = ab.ServiceName,
                    BindingAddress = ab.BindingAddress,
                    MethodName = ab.RowMethodName
                };
                m_ServiceMonitor.Add(msDimension, serviceMonitorArray);
            }
            else
            {
                serviceMonitorArray = m_ServiceMonitor[msDimension];
            }

            RecordItem(ab, serviceMonitorArray);
        }