/// <inheritdoc/> public override void StatusReported(StatusEventData data) { var worker = m_scheduler.Workers[m_workerId]; worker.ActualFreeMemoryMb = data.RamFreeMb; worker.ActualFreeCommitMb = data.CommitFreeMb; }
/// <nodoc /> public static StatusReportedEvent ToResourceUsageReportedEvent(this StatusEventData data, uint workerID) { var statusReportedEvent = new StatusReportedEvent() { WorkerID = workerID, Time = Google.Protobuf.WellKnownTypes.Timestamp.FromDateTime(data.Time), CpuPercent = data.CpuPercent, RamPercent = data.RamPercent, MachineRamUtilizationMB = data.RamUsedMb, CommitPercent = data.CommitPercent, CommitTotalMB = data.CommitUsedMb, ProcessCpuPercent = data.ProcessCpuPercent, ProcessWorkingSetMB = data.ProcessWorkingSetMB, CpuWaiting = data.CpuWaiting, CpuRunning = data.CpuRunning, IoCurrentMax = data.IoCurrentMax, IoWaiting = data.IoWaiting, IoRunning = data.IoRunning, LookupWaiting = data.LookupWaiting, LookupRunning = data.LookupRunning, ExternalProcesses = data.ExternalProcesses, LimitingResource = (ExecutionSampler_LimitingResource)(data.LimitingResource + 1), UnresponsivenessFactor = data.UnresponsivenessFactor, ProcessPipsPending = data.ProcessPipsPending, ProcessPipsAllocatedSlots = data.ProcessPipsAllocatedSlots }; statusReportedEvent.DiskPercents.AddRange(data.DiskPercents); statusReportedEvent.DiskQueueDepths.AddRange(data.DiskQueueDepths); statusReportedEvent.PipsSucceededAllTypes.AddRange(data.PipsSucceededAllTypes); return(statusReportedEvent); }
/// <inheritdoc/> public override void StatusReported(StatusEventData data) { var worker = m_scheduler.Workers[m_workerId]; worker.ActualFreeMemoryMb = data.RamFreeMb; worker.ActualFreeCommitMb = data.CommitFreeMb; if (worker.IsRemote) { ((RemoteWorkerBase)worker).SetEffectiveTotalProcessSlots(data.EffectiveTotalProcessSlots); } }
/// <summary> /// Override event to capture its data and store it in the protobuf /// </summary> public override void StatusReported(StatusEventData data) { var value = data.ToResourceUsageReportedEvent(WorkerID.Value); var key = new EventKey { EventTypeID = Xldb.Proto.ExecutionEventId.ResourceUsageReported, EventSequenceNumber = Interlocked.Increment(ref m_eventSequenceNumber) }; var keyArr = key.ToByteArray(); var valueArr = value.ToByteArray(); WriteToDb(keyArr, valueArr, XldbDataStore.EventColumnFamilyName); AddToDbStorageDictionary(DBStoredTypes.ResourceUsageReported, keyArr.Length + valueArr.Length); }
/// <inheritdoc/> public override void StatusReported(StatusEventData data) { var worker = m_scheduler.Workers[m_workerId]; worker.ActualFreeMemoryMb = data.RamFreeMb; worker.ActualFreeCommitMb = data.CommitFreeMb; if (worker.IsRemote) { worker.TotalCommitMb = data.CommitUsedMb + data.CommitFreeMb; } if (m_tracerEnabled && DateTime.UtcNow > m_tracerLastUpdated.AddSeconds(EngineEnvironmentSettings.MinStepDurationSecForTracer)) { LogPercentageCounter(worker, "CPU", data.CpuPercent, data.Time.Ticks); LogPercentageCounter(worker, "RAM", data.RamPercent, data.Time.Ticks); m_tracerLastUpdated = DateTime.UtcNow; } }
/// <nodoc /> public static Xldb.StatusReportedEvent ToResourceUsageReportedEvent(this StatusEventData data, uint workerID) { var Uuid = Guid.NewGuid().ToString(); var statusReportedEvent = new Xldb.StatusReportedEvent() { UUID = Uuid, WorkerID = workerID, Time = Google.Protobuf.WellKnownTypes.Timestamp.FromDateTime(data.Time), CpuPercent = data.CpuPercent, RamPercent = data.RamPercent, MachineRamUtilizationMB = data.MachineRamUtilizationMB, CommitPercent = data.CommitPercent, CommitTotalMB = data.CommitTotalMB, ProcessCpuPercent = data.ProcessCpuPercent, ProcessWorkingSetMB = data.ProcessWorkingSetMB, CpuWaiting = data.CpuWaiting, CpuRunning = data.CpuRunning, IoCurrentMax = data.IoCurrentMax, IoWaiting = data.IoWaiting, IoRunning = data.IoRunning, LookupWaiting = data.LookupWaiting, LookupRunning = data.LookupRunning, ExternalProcesses = data.ExternalProcesses, LimitingResource = (Xldb.ExecutionSampler_LimitingResource)data.LimitingResource, UnresponsivenessFactor = data.UnresponsivenessFactor, ProcessPipsPending = data.ProcessPipsPending, ProcessPipsAllocatedSlots = data.ProcessPipsAllocatedSlots }; statusReportedEvent.DiskPercents.AddRange(data.DiskPercents.Select(percent => percent)); statusReportedEvent.DiskQueueDepths.AddRange(data.DiskQueueDepths.Select(depth => depth)); statusReportedEvent.PipsSucceededAllTypes.AddRange(data.PipsSucceededAllTypes.Select(type => type)); return(statusReportedEvent); }
/// <summary> /// Resource and PipQueue usage is reported /// </summary> public virtual void StatusReported(StatusEventData data) { ReportUnhandledEvent(data); }