예제 #1
0
        protected override void PreStart()
        {
            _counter             = new PerformanceCounter(PerformanceCounterHelper.MainCategory, PerformanceCounterHelper.GetPerformanceCounterName(StatisticType.AvgTimeToSeeADoctor, _hospital.Id), false);
            _counter.RawValue    = 0;
            _msgPerSecondCounter = new PerformanceCounter(PerformanceCounterHelper.MainCategory, $"(H{_hospital.Id}) Messages par seconde pour {PerformanceCounterHelper.CounterAvgTimeToSeeADoctor}", false);

            _patients    = new Dictionary <int, DateTime>();
            _avgDuration = 0.0d;
            _statCount   = 0;

            _cancelPublishing = ScheduleGatherStatsTask();
        }
        protected override void PreStart()
        {
            _counter          = new PerformanceCounter(PerformanceCounterHelper.MainCategory, PerformanceCounterHelper.GetPerformanceCounterName(StatisticType.EstimatedTimeToSeeADoctor, _hospital.Id), false);
            _counter.RawValue = 0;

            _patients = new Dictionary <DiseasePriority, Dictionary <int, RegisterPatient> >();
            for (var diseasePriority = DiseasePriority.VeryHigh; diseasePriority < DiseasePriority.Invalid; ++diseasePriority)
            {
                _patients.Add(diseasePriority, new Dictionary <int, RegisterPatient>());
            }

            _doctors     = new Dictionary <int, BeginAppointmentWithDoctor>();
            _avgDuration = 0.0d;
            _statCount   = 0;
            _remainingTimeToSeeADoctor = new List <long>(_hospital.AssignedDoctors);

            _cancelPublishing = ScheduleGatherStatsTask();
        }
        protected override void PreStart()
        {
            _counter          = new PerformanceCounter(PerformanceCounterHelper.MainCategory, PerformanceCounterHelper.GetPerformanceCounterName(StatisticType.AvgAppointmentDuration, _hospital.Id), false);
            _counter.RawValue = 0;

            _patients    = new Dictionary <int, DateTime>();
            _avgDuration = 0.0d;
            _statCount   = 0;

            _cancelPublishing = ScheduleGatherStatsTask();
        }
예제 #4
0
        protected override void PreStart()
        {
            _counter          = new PerformanceCounter(PerformanceCounterHelper.MainCategory, PerformanceCounterHelper.GetPerformanceCounterName(StatisticType.Illness, _hospital.Id), false);
            _counter.RawValue = 0;

            _cancelPublishing = ScheduleGatherStatsTask();
        }