-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't initialize trace if specifically asked not to #1490
Don't initialize trace if specifically asked not to #1490
Conversation
@dotnet-bot test this please |
@@ -53,7 +53,7 @@ public void SetupRemoteEqtTraceListeners(AppDomain childDomain) | |||
} | |||
else | |||
{ | |||
remoteEqtTrace.DoNotInitialize = true; | |||
this.DoNotInitialize = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier we were setting DoNotInitialize as true in child domain. But not we are changing it to calling domain. Will it not break anything? I think it should point to child domain only
@@ -72,6 +72,19 @@ public static string LogFile | |||
} | |||
} | |||
|
|||
[System.ComponentModel.DefaultValue(false)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we are setting DefaultValue?
AFAIK DefaultValue attribute doesn't initialize property with default value. It just is a meta data.
Also by default, value is initialized to false as its bool. So do we need this attribute?
@@ -9,6 +9,13 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel | |||
/// </summary> | |||
public partial interface IPlatformEqtTrace | |||
{ | |||
// This is added to ensure that traceSource should not be instantiated in when creating appdomains if EqtTrace is not enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used only for appdomains?
|
||
else | ||
{ | ||
EqtTrace.DoNotInitailize = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not do the same for data collectors and vstest console processes?
|
||
else | ||
{ | ||
EqtTrace.DoNotInitailize = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests for the case when DoNotInitialize is true to ensure trace is not initialzied?
* Skip default adapters for translation layer clients (#1488) * Skip default extensions * Review comments * Unit tests * review comments * Perf tests for Skip default adapters (#1504) * Perf tests for Skip default adapters * review comments * review comments * Don't initialize trace if specifically asked not to (#1490) * Donot initialize trace if specifically asked not to * For Testhost only Initialize Tracing if --diag is passed * test fix * Tracing for datacollector also to be initialized via --diag switch * Telemetry name correction (#1512)
@@ -72,6 +72,18 @@ public static string LogFile | |||
} | |||
} | |||
|
|||
public static bool DoNotInitailize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: DoNotInitialize
No description provided.