-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathITelemetryForwarder.cs
More file actions
38 lines (32 loc) · 1.28 KB
/
ITelemetryForwarder.cs
File metadata and controls
38 lines (32 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.Build.BackEnd.Logging;
namespace Microsoft.Build.TelemetryInfra;
/// <summary>
/// A build component responsible for accumulating telemetry data from worker node and then sending it to main node
/// at the end of the build.
/// </summary>
internal interface ITelemetryForwarder
{
bool IsTelemetryCollected { get; }
void AddTask(
string name,
TimeSpan cumulativeExecutionTime,
short executionsCount,
long totalMemoryConsumed,
bool isCustom,
bool isFromNugetCache,
string? taskFactoryName,
string? taskHostRuntime);
/// <summary>
/// Add info about target execution to the telemetry.
/// </summary>
/// <param name="name"></param>
/// <param name="wasExecuted">Means anytime, not necessarily from the last time target was added to telemetry</param>
/// <param name="isCustom"></param>
/// <param name="isMetaproj"></param>
/// <param name="isFromNugetCache"></param>
void AddTarget(string name, bool wasExecuted, bool isCustom, bool isMetaproj, bool isFromNugetCache);
void FinalizeProcessing(LoggingContext loggingContext);
}