diff --git a/Public/Src/Engine/Scheduler/Scheduler.cs b/Public/Src/Engine/Scheduler/Scheduler.cs index 7ef060538..c5ff3f904 100644 --- a/Public/Src/Engine/Scheduler/Scheduler.cs +++ b/Public/Src/Engine/Scheduler/Scheduler.cs @@ -1827,6 +1827,13 @@ namespace BuildXL.Scheduler } } + var runRemoteProcesses = PipExecutionCounters.GetCounterValue(PipExecutorCounter.TotalRunRemoteProcesses); + var runRemoteFallback = PipExecutionCounters.GetCounterValue(PipExecutorCounter.TotalRemoteFallbackRetries); + if (runRemoteProcesses - runRemoteFallback > 0) + { + Logger.Log.RemoteBuildSavingsSummary(loggingContext, runRemoteProcesses, cacheMisses: totalProcessesNotIgnoredOrService - m_numProcessPipsSatisfiedFromCache); + } + if (m_configuration.Engine.Converge && cacheRate < 1 && m_configuration.Logging.ExecutionLog.IsValid) { Logger.Log.SchedulerDidNotConverge( diff --git a/Public/Src/Engine/Scheduler/Tracing/Log.cs b/Public/Src/Engine/Scheduler/Tracing/Log.cs index 73077e9ab..b47bad8eb 100644 --- a/Public/Src/Engine/Scheduler/Tracing/Log.cs +++ b/Public/Src/Engine/Scheduler/Tracing/Log.cs @@ -1077,6 +1077,15 @@ namespace BuildXL.Scheduler.Tracing Message = EventConstants.PhasePrefix + "Shared cache usage: Downloaded {remoteProcesses} processes [{relativeCacheRate:P} of cache hits] and {contentDownloaded} of outputs.")] internal abstract void IncrementalBuildSharedCacheSavingsSummary(LoggingContext loggingContext, double relativeCacheRate, long remoteProcesses, string contentDownloaded); + [GeneratedEvent( + (ushort)LogEventId.RemoteBuildSavingsSummary, + EventGenerators = EventGenerators.LocalOnly, + EventLevel = Level.Informational, + Keywords = (int)(Keywords.UserMessage), + EventTask = (ushort)Tasks.Scheduler, + Message = EventConstants.PhasePrefix + "Cache misses run remotely: {runRemoteProcesses} of {cacheMisses}.")] + internal abstract void RemoteBuildSavingsSummary(LoggingContext loggingContext, long runRemoteProcesses, long cacheMisses); + [GeneratedEvent( (ushort)LogEventId.SchedulerDidNotConverge, EventGenerators = EventGenerators.LocalOnly, diff --git a/Public/Src/Engine/Scheduler/Tracing/LogEventId.cs b/Public/Src/Engine/Scheduler/Tracing/LogEventId.cs index 269aa8894..9123e3395 100644 --- a/Public/Src/Engine/Scheduler/Tracing/LogEventId.cs +++ b/Public/Src/Engine/Scheduler/Tracing/LogEventId.cs @@ -135,6 +135,7 @@ namespace BuildXL.Scheduler.Tracing IncrementalBuildSharedCacheSavingsSummary = 1513, RemoteCacheHitsGreaterThanTotalCacheHits = 1514, SchedulerDidNotConverge = 1515, + RemoteBuildSavingsSummary = 1516, PipMaterializeDependenciesFailureUnrelatedToCache = 2102,