Skip to content

Commit efa8d35

Browse files
Merge pull request #10628 from MicrosoftDocs/main638755850610518842sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents fe05e6d + d71317e commit efa8d35

File tree

6 files changed

+137
-98
lines changed

6 files changed

+137
-98
lines changed

docs/extensibility/visualstudio.extensibility/project/project-concepts.md

Lines changed: 95 additions & 94 deletions
Large diffs are not rendered by default.

docs/extensibility/visualstudio.extensibility/project/project.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ This overview covers top scenarios for working with the project query API:
5252
- [Action Query to Load/Unload a Project](#action-query-to-loadunload-a-project)
5353
- [Action Query to Build Solutions/Projects](#action-query-to-build-solutionsprojects)
5454
- [Action Query to Save a Solution/Project](#action-query-to-save-solutionsprojects)
55+
- [Query to Subscribe to Query Changes](#query-to-subscribe-to-query-changes)
5556
- [Query to Track Query Changes](#query-to-track-query-changes)
57+
- [Events to monitor solution open and close](#events-to-monitor-solution-open-and-close)
5658
- [Action Query to Skip](#action-query-to-skip)
5759

5860
## Access the project query space
@@ -696,6 +698,26 @@ private class TrackerObserver : IObserver<IQueryTrackUpdates<IFileSnapshot>>
696698
}
697699
```
698700

701+
## Events to monitor solution open and close
702+
703+
The `QueryableSpaceChanged` event can be subscribed to for monitoring when solutions open and close using a workspace created with a service broker. `ProjectQueryableSpaceChangedEventArgs` contains two fields, `SolutionPath` and `QueryableSpaceVersion`. The string `SolutionPath` is the path the solution that opened or null if a solution closed. The int `QueryableSpaceVersion` increments as solutions are opened or closed.
704+
705+
```csharp
706+
private void SubscribeToEvent()
707+
{
708+
IServiceBroker serviceBroker = context.Extensibility.ServiceBroker;
709+
ProjectQueryableSpace workspace = new(serviceBroker: serviceBroker, joinableTaskContext: null);
710+
workspace.QueryableSpaceChanged += EventCalledAsync;
711+
}
712+
713+
private Task EventCalledAsync(ProjectQueryableSpaceChangedEventArgs e)
714+
{
715+
string? solutionPath = e.SolutionPath;
716+
int version = e.QueryableSpaceVersion;
717+
...
718+
}
719+
```
720+
699721
## Action query to skip
700722

701723
`Skip` can be used to skip N results from a query.

docs/profiling/cpu-usage.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,17 @@ For more information, see [CPU insights](../profiling/cpu-insights.md).
9999
## Analyze CPU utilization
100100

101101
::: moniker range=">=vs-2022"
102-
To analyze the CPU Usage report, click **Open details**, or click one of the top functions to open the **Functions** view.
102+
For in-depth analysis of the CPU Usage report, first open one of the detailed report views:
103103

104-
The report provides different views of the diagnostic data:
104+
1. Click **Open details** in the summary page of the report, or select one of the top functions to open the **Functions** view.
105+
106+
![Screenshot that shows the Open details link.](../profiling/media/vs-2022/cpu-use-open-details.png)
107+
108+
1. From the **Current View** list, you can select one of the detailed report views.
109+
110+
![Screenshot that shows the list of detailed reports.](../profiling/media/vs-2022/cpu-use-select-detailed-view.png)
111+
112+
The following table provides a description of the detailed views.
105113

106114
|View|Description|
107115
|-|-|

docs/profiling/instrumentation.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,17 @@ In addition, if you're using Copilot, use the **Ask Copilot** button to open the
6767

6868
## Analyze instrumentation detailed reports
6969

70-
To analyze the Instrumentation report, click **Open details**, or click one of the top functions to open the **Functions** view.
70+
For in-depth analysis of the Instrumentation report, first open one of the detailed report views:
7171

72-
The report provides different views of the diagnostic data:
72+
1. Click **Open details** in the summary page of the report, or select one of the top functions to open the **Functions** view.
73+
74+
![Screenshot that shows the Open details link.](../profiling/media/vs-2022/cpu-use-open-details.png)
75+
76+
1. From the **Current View** list, you can select one of the detailed report views.
77+
78+
![Screenshot that shows the list of detailed reports.](../profiling/media/vs-2022/cpu-use-select-detailed-view.png)
79+
80+
The following table provides a description of the detailed views.
7381

7482
|View|Description|
7583
|-|-|
863 Bytes
Loading
3.74 KB
Loading

0 commit comments

Comments
 (0)