Example #1
0
        public FarmOverview(string farmLabel, DateTime startTime, DateTime endTime)
        {
            FarmLabel = farmLabel;
            StartTime = startTime;
            EndTime   = endTime;
            // convert to milliseconds from epoch
            long startMillisFromEpoch = (long)StartTime.Subtract(DateTimeUtils.EPOCH_1970).TotalMilliseconds;
            long endMillisFromEpoch   = (long)EndTime.Subtract(DateTimeUtils.EPOCH_1970).TotalMilliseconds;

            Probe = ProbeOverviewRequest.Get(FarmLabel, startMillisFromEpoch, endMillisFromEpoch);
            SQL   = SQLPerfOverviewRequest.Get(FarmLabel, startMillisFromEpoch, endMillisFromEpoch);
            USR   = USRandRPSPerfOverviewRequest.Get(FarmLabel, startMillisFromEpoch, endMillisFromEpoch);
        }
Example #2
0
        public FarmOverview(string farmLabel)
        {
            FarmLabel = farmLabel;
            EndTime   = DateTime.Now;
            StartTime = EndTime.AddHours(-1); // grab 1 hours worth
            // milliseconds from epoch
            long endTime   = (long)DateTime.Now.Subtract(DateTimeUtils.EPOCH_1970).TotalMilliseconds;
            long startTime = endTime - (1000 * 60 * 60);  // grab 1 hours worth

            Probe = ProbeOverviewRequest.Get(FarmLabel, startTime, endTime);
            SQL   = SQLPerfOverviewRequest.Get(FarmLabel, startTime, endTime);
            USR   = USRandRPSPerfOverviewRequest.Get(FarmLabel, startTime, endTime);
        }