Skip to content

Commit 8b6863f

Browse files
committed
Ex10 updates to the lab instructions
1 parent 5f9e623 commit 8b6863f

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

Instructions/Labs/LAB_AK_10_implement_performance_profiling.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Use the following steps to download the sample project and open it in Visual Stu
107107
108108
You're a software developer working for a consulting firm. Your clients need help implementing performance profiling in legacy applications. Your goal is to improve code performance while preserving readability and the existing functionality. You're assigned to the following app:
109109
110-
- ContosoOnlineStore: This is a comprehensive e-commerce application that processes customer orders with realistic business complexity. The application includes product catalog management with search capabilities, inventory tracking with stock reservations, order processing with validation and receipts, email notification services, and security validation. The application uses modern .NET architecture patterns including dependency injection, structured logging, and configuration management, but contains intentional performance bottlenecks that mirror real-world scenarios.
110+
- ContosoOnlineStore: This is an e-commerce application that processes customer orders with realistic business complexity. The application includes product catalog management with search capabilities, inventory tracking with stock reservations, order processing with validation and receipts, email notification services, and security validation. The application uses modern .NET architecture patterns including dependency injection, structured logging, and configuration management, but contains performance bottlenecks that mirror real-world scenarios.
111111
112112
This exercise includes the following tasks:
113113
@@ -124,7 +124,7 @@ In this task, you'll examine the main components of the ContosoOnlineStore proje
124124

125125
Use the following steps to complete this task:
126126

127-
1. Take a minute to review the ContosoOnlineStore project structure.
127+
1. Take a few minutes to review the ContosoOnlineStore project structure.
128128

129129
The codebase follows modern .NET architecture patterns with clear separation of concerns. The main architectural components include:
130130

@@ -150,7 +150,7 @@ Use the following steps to complete this task:
150150
151151
1. Run the application and observe the baseline performance.
152152
153-
You can run the application from the Visual Studio Code integrated terminal by navigating to the project folder and running:
153+
You can run the application from the Visual Studio Code integrated terminal by navigating to the project folder and running the following .NET CLI command:
154154
155155
```bash
156156
dotnet run
@@ -164,7 +164,9 @@ Use the following steps to complete this task:
164164
- Concurrent operation testing
165165
- Email notification simulation
166166
167-
1. Record the baseline performance metrics.
167+
1. Store the baseline performance metrics in a file named **baseline_metrics.txt**.
168+
169+
Create a text file named baseline_metrics.txt. Copy the console output into the baseline_metrics.txt file.
168170
169171
Pay attention to the timing information displayed in the console output, such as:
170172
@@ -176,12 +178,12 @@ Use the following steps to complete this task:
176178
177179
The application also runs a comprehensive performance analysis suite that tests various operations and reports timing details.
178180
179-
1. Examine the performance benchmark capabilities.
181+
1. Take a minute to examine the performance benchmark capabilities provided by the OrderProcessingBenchmarks.cs file.
180182
181183
The application includes professional benchmarking using BenchmarkDotNet. You can run detailed performance benchmarks by executing:
182184
183185
```bash
184-
dotnet run benchmark
186+
dotnet run -c Release -- benchmark
185187
```
186188
187189
This will generate detailed performance reports including memory allocation patterns and statistical analysis.
@@ -202,19 +204,19 @@ Use the following steps to complete this task:
202204

203205
> **NOTE**: The GPT-4o model provides excellent code analysis capabilities and is recommended for this performance analysis task.
204206

205-
1. Close any files that aren't directly related to the performance analysis.
207+
1. Close any files that you have open in the editor.
206208

207209
GitHub Copilot uses files that are open in the editor to establish context. Having only the target files open helps focus the analysis on the code you want to optimize.
208210

209-
1. Add the main business logic files to the Chat context.
211+
1. Add the **ProductCatalog.cs**, **OrderProcessor.cs**, and **InventoryManager.cs** files to the Chat context.
210212

211213
Use a drag-and-drop operation to add **ProductCatalog.cs**, **OrderProcessor.cs**, and **InventoryManager.cs** from the SOLUTION EXPLORER to the Chat context.
212214

213215
Adding files to the chat context tells GitHub Copilot to include those files when analyzing your prompts, which improves the accuracy and relevance of its analysis.
214216

215217
1. Ask GitHub Copilot to identify performance bottlenecks in the ProductCatalog class.
216218

217-
Enter the following prompt in the Chat view:
219+
For example, enter the following prompt in the Chat view:
218220

219221
```text
220222
Analyze the ProductCatalog class for performance bottlenecks. Focus on the GetProductById, SearchProducts, and GetProductsByCategory methods. What are the main inefficiencies and how could they be optimized?
@@ -229,7 +231,7 @@ Use the following steps to complete this task:
229231
230232
1. Ask GitHub Copilot to analyze the OrderProcessor performance issues.
231233
232-
Submit the following prompt:
234+
For example, submit the following prompt:
233235
234236
```text
235237
Examine the OrderProcessor class, particularly the CalculateOrderTotal and FinalizeOrderAsync methods. What performance problems do you see and what optimization strategies would you recommend?
@@ -244,7 +246,7 @@ Use the following steps to complete this task:
244246
245247
1. Analyze the InventoryManager for efficiency issues.
246248
247-
Use this prompt to examine inventory operations:
249+
For example, use this prompt to examine inventory operations:
248250
249251
```text
250252
Review the InventoryManager class, especially the GetLowStockProducts and UpdateStockLevels methods. What are the performance concerns and how could the inventory operations be improved?
@@ -259,7 +261,7 @@ Use the following steps to complete this task:
259261
260262
1. Ask about the EmailService performance characteristics.
261263
262-
Submit this prompt to analyze the email service:
264+
For example, submit this prompt to analyze the email service:
263265
264266
```text
265267
Analyze the EmailService class for performance issues. How does the email sending process impact overall application performance and what improvements could be made?
@@ -408,7 +410,7 @@ Use the following steps to complete this task:
408410
Run the detailed performance benchmarks to get precise measurements:
409411
410412
```bash
411-
dotnet run benchmark
413+
dotnet run -c Release -- benchmark
412414
```
413415
414416
Review the BenchmarkDotNet reports, which provide detailed statistics including:

0 commit comments

Comments
 (0)