Add telemetry data points for .NET Core 2.0
This commit is contained in:
parent
676fe41aca
commit
081f208942
29 changed files with 1324 additions and 77 deletions
|
@ -18,6 +18,7 @@ using MSBuildCommand = Microsoft.DotNet.Tools.Test.Utilities.MSBuildCommand;
|
|||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
|
||||
// There are tests which modify static Telemetry.CurrentSessionId and they cannot run in parallel
|
||||
[assembly: CollectionBehavior(DisableTestParallelization = true)]
|
||||
|
||||
|
@ -129,7 +130,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
[Fact]
|
||||
public void WhenTelemetryIsEnabledTheLoggerIsAddedToTheCommandLine()
|
||||
{
|
||||
Telemetry telemetry;
|
||||
Telemetry.Telemetry telemetry;
|
||||
string[] allArgs = GetArgsForMSBuild(() => true, out telemetry);
|
||||
// telemetry will still be disabled if environment variable is set
|
||||
if (telemetry.Enabled)
|
||||
|
@ -156,14 +157,15 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
|
||||
private string[] GetArgsForMSBuild(Func<bool> sentinelExists)
|
||||
{
|
||||
Telemetry telemetry;
|
||||
Telemetry.Telemetry telemetry;
|
||||
return GetArgsForMSBuild(sentinelExists, out telemetry);
|
||||
}
|
||||
|
||||
private string[] GetArgsForMSBuild(Func<bool> sentinelExists, out Telemetry telemetry)
|
||||
private string[] GetArgsForMSBuild(Func<bool> sentinelExists, out Telemetry.Telemetry telemetry)
|
||||
{
|
||||
Telemetry.CurrentSessionId = null; // reset static session id modified by telemetry constructor
|
||||
telemetry = new Telemetry(new MockNuGetCacheSentinel(sentinelExists));
|
||||
|
||||
Telemetry.Telemetry.CurrentSessionId = null; // reset static session id modified by telemetry constructor
|
||||
telemetry = new Telemetry.Telemetry(new MockNuGetCacheSentinel(sentinelExists));
|
||||
|
||||
MSBuildForwardingApp msBuildForwardingApp = new MSBuildForwardingApp(Enumerable.Empty<string>());
|
||||
|
||||
|
|
Reference in a new issue