Merge pull request #2724 from adamgorMSFT/adamgor/telemetry-perf-improvements

Improving Telemetry performance
This commit is contained in:
Piotr Puszkiewicz 2016-05-03 15:14:58 -07:00
commit 99193a3a91
3 changed files with 64 additions and 41 deletions

View file

@ -135,6 +135,8 @@ namespace Microsoft.DotNet.Cli
command = "help";
}
telemetryClient.TrackEvent(command, null, null);
int exitCode;
Func<string[], int> builtIn;
if (s_builtIns.TryGetValue(command, out builtIn))
@ -150,13 +152,6 @@ namespace Microsoft.DotNet.Cli
exitCode = result.ExitCode;
}
telemetryClient.TrackEvent(
command,
null,
new Dictionary<string, double>
{
["ExitCode"] = exitCode
});
return exitCode;