Skip to content

Conversation

@rainersigwald
Copy link
Member

@rainersigwald rainersigwald commented Sep 21, 2021

SDK resolution can be a nontrivial part of evaluation time, so add events to quantify the different phases:

  1. CachedSdkResolverServiceResolveSdk for each time the evaluator sees an SDK.
  2. SdkResolverResolveSdk for each time an actual resolver is called to do resolution (a subset of 1 because most results are cached).
  3. SdkResolverServiceInitialize around the loading of the resolvers.

SDK resolution can be a nontrivial part of evaluation time, so add
events to quantify the different phases:

1. `CachedSdkResolverServiceResolveSdk` for each time the evaluator sees
   an SDK.
2. `SdkResolverResolveSdk` for each time an actual resolver is called to
   do resolution (a subset of 1 because most results are cached).
3. `SdkResolverServiceInitialize` around the loading of the resolvers.
Copy link
Contributor

@Forgind Forgind 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!

I'm just wondering about names. They're clear, but "CachedSdkResolverServiceResolveSdkStart" is a lot of letters to type; maybe "ResolveSdkFromCache" and "ResolveSdk"?

@benvillalobos benvillalobos added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Oct 11, 2021
@ladipro ladipro merged commit 1f49f8a into dotnet:main Oct 13, 2021
@rainersigwald rainersigwald deleted the sdk-events branch November 3, 2021 20:04
Forgind pushed a commit that referenced this pull request Dec 22, 2021
…ts (#7139)

Fixes #7136

Context
Adding on to #6876, this change adds more events to SDK resolution.

Changes Made
Add boolean to CachedSdkResolverServiceResolveSdkStop so we can differentiate cached and non-cached calls
Add OutOfProcSdkResolverServiceRequestSdkPathFromMainNodeStart and OutOfProcSdkResolverServiceRequestSdkPathFromMainNodeStop events to track how long it takes to send/receive an SDK result from the main node
Add SdkResolverEvent, SdkResolverEventStart, and SdkResolverEventStop methods to Microsoft.Build.Framework.SdkLogger so that SDK resolvers can contribute to the events in SDK resolution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Performance merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants