示例#1
0
 private static void Record(ref SystemWorkloadManagerLogEntry lastEntry, SystemWorkloadManagerLogEntryType type, ResourceKey resource, WorkloadClassification classification, ResourceLoad load, int slots, bool delayed)
 {
     if ((SystemWorkloadManagerBlackBox.active == null || SystemWorkloadManagerBlackBox.active.Contains(classification)) && (lastEntry == null || lastEntry.CurrentEvent.Load.State != load.State || lastEntry.CurrentEvent.Slots != slots || lastEntry.CurrentEvent.Delayed != delayed))
     {
         SystemWorkloadManagerEvent currentEvent = new SystemWorkloadManagerEvent(load, slots, delayed);
         lock (SystemWorkloadManagerBlackBox.history)
         {
             while (SystemWorkloadManagerBlackBox.history.Count >= SystemWorkloadManagerBlackBox.maxHistoryDepth)
             {
                 SystemWorkloadManagerBlackBox.history.Dequeue();
             }
             if (lastEntry == null)
             {
                 lastEntry = new SystemWorkloadManagerLogEntry(type, resource, classification, currentEvent, null);
                 SystemWorkloadManagerBlackBox.history.Enqueue(lastEntry);
             }
             else
             {
                 lastEntry = new SystemWorkloadManagerLogEntry(type, resource, classification, currentEvent, lastEntry.CurrentEvent);
                 SystemWorkloadManagerBlackBox.history.Enqueue(lastEntry);
             }
         }
     }
 }
示例#2
0
 public static void RecordAdmissionUpdate(ref SystemWorkloadManagerLogEntry lastEntry, ResourceKey resource, WorkloadClassification classification, ResourceLoad load, int slots, bool delayed)
 {
     SystemWorkloadManagerBlackBox.Record(ref lastEntry, SystemWorkloadManagerLogEntryType.Admission, resource, classification, load, slots, delayed);
 }
示例#3
0
 public static void RecordMonitorUpdate(ref SystemWorkloadManagerLogEntry lastEntry, ResourceKey resource, WorkloadClassification classification, ResourceLoad load)
 {
     SystemWorkloadManagerBlackBox.Record(ref lastEntry, SystemWorkloadManagerLogEntryType.Monitor, resource, classification, load, -1, false);
 }