Skip to content
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

Merged
merged 5 commits into from
Mar 26, 2018
Merged

Don't initialize trace if specifically asked not to #1490

merged 5 commits into from
Mar 26, 2018

Conversation

mayankbansal018
Copy link
Contributor

No description provided.

@mayankbansal018
Copy link
Contributor Author

@dotnet-bot test this please

@singhsarab singhsarab closed this Mar 23, 2018
@singhsarab singhsarab reopened this Mar 23, 2018
@mayankbansal018 mayankbansal018 changed the title [WIP] Don't initialize trace if specifically asked not to Don't initialize trace if specifically asked not to Mar 23, 2018
@@ -53,7 +53,7 @@ public void SetupRemoteEqtTraceListeners(AppDomain childDomain)
}
else
{
remoteEqtTrace.DoNotInitialize = true;
this.DoNotInitialize = true;
Copy link
Contributor

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)]
Copy link
Contributor

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.
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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?

@mayankbansal018 mayankbansal018 merged commit eca43d7 into microsoft:perf-improvements Mar 26, 2018
mayankbansal018 added a commit that referenced this pull request Mar 28, 2018
* 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: DoNotInitialize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants