зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 654144: Stop flushing statsprf.json file upon cancellation
This file gets flushed slightly differently as part of the scheduler's shutdown process. That's good for typical builds, but when a build is cancelled due to timeout that makes it harder to tell what was going on during at the point that it was cancelled. So skip flushing the file if cancellation is requested to preserve its state.
This commit is contained in:
Родитель
1692ae2798
Коммит
0cbcf00ec4
|
@ -218,6 +218,13 @@ namespace BuildXL.Scheduler.Tracing
|
|||
|
||||
internal void WriteCountersFile(PipExecutionContext context, ILoggingConfiguration loggingConfiguration, TimeSpan? refreshInterval = null)
|
||||
{
|
||||
// Skip further updates to tracker counters file when cancellation is requested to preserve state prior
|
||||
// to winding everything down. This is helpful for debugging the state of builds that time out.
|
||||
if (context.CancellationToken.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool includeOutstanding = refreshInterval != null;
|
||||
lock (m_counterFileLock)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче