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

TestPluginCache and other dependencies refactoring #2537

Merged
merged 36 commits into from
Nov 19, 2020

Conversation

Sanan07
Copy link
Contributor

@Sanan07 Sanan07 commented Aug 25, 2020

Description

Refactoring of TestPluginCache and other classes responsible for test discovery and test execution

Fix : #2634

@Sanan07
Copy link
Contributor Author

Sanan07 commented Oct 7, 2020

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@Sanan07
Copy link
Contributor Author

Sanan07 commented Oct 7, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Sanan07
Copy link
Contributor Author

Sanan07 commented Oct 7, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Sanan07
Copy link
Contributor Author

Sanan07 commented Oct 8, 2020

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@Sanan07
Copy link
Contributor Author

Sanan07 commented Oct 14, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Sanan07 Sanan07 self-assigned this Nov 9, 2020
@Sanan07 Sanan07 marked this pull request as ready for review November 9, 2020 15:59
Copy link
Member

@nohwnd nohwnd left a comment

Choose a reason for hiding this comment

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

Do we have some measurements on this? I would like to see it do it's magic. How much time should this save? And how to best test it?

@Sanan07
Copy link
Contributor Author

Sanan07 commented Nov 13, 2020

@nohwnd Do you mean measurements of using custom attributes? If assembly has custom attributes, on average it takes 1.5-2ms to get that "interesting" types, compared to 30ms which takes calling GetTypes() method on assembly. So having that custom attributes on several assemblies (for now 5 assemblies and will add to MSTestAdapter as well) can save us around ~170 - 200ms.

@nohwnd
Copy link
Member

nohwnd commented Nov 13, 2020

Yeah, just wanted the benefit to be documented here for future reference. :)

Copy link
Contributor

@Haplois Haplois left a comment

Choose a reason for hiding this comment

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

Looks good, but I have a nit-picking comment.

@@ -18,6 +17,6 @@ public TypesToLoadAttribute(params Type[] types)
Types = types;
}

public IEnumerable<Type> Types { get; }
public Type[] Types { get; }
Copy link
Contributor

Choose a reason for hiding this comment

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

This is no longer immutable.

Copy link
Member

Choose a reason for hiding this comment

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

IEnumerable, is also not immutable isn't it? But does it matter? How would this collection change to cause problems? We would need a static ctor to find it and modify it on assembly load?

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.

Assembly caching in Test Platform
3 participants