Skip to content

Commit 0862c6d

Browse files
Refine titles and descriptions in resource usage documentation for clarity and consistency
1 parent 885b1ca commit 0862c6d

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

content/learning-paths/laptops-and-desktops/win-resource-ps1/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ operatingsystems:
3131

3232
further_reading:
3333
- resource:
34-
title: Recording for Resource-based Analysis
34+
title: Recording for resource-based analysis
3535
link: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/hh448202(v=win.10)
3636
type: documentation
3737
- resource:

content/learning-paths/laptops-and-desktops/win-resource-ps1/how-to-1.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ layout: learningpathall
77
---
88

99
## Overview
10-
System resource usage provides an approach to understand the performance of an application as a black box. This Learning Path demonstrates how to sample system resource usage using a script.
10+
To understand how well your application performs, you can measure its system resource usage (such as CPU time and memory) without needing to look inside the code. In this Learning Path, you'll learn how to collect resource usage data using a simple script. This helps you compare performance between different builds and see how efficiently your system runs each version.
1111

1212
The example application you will use is FFmpeg, a tool set that performs video encode and decode tasks. You will run the same tests with both the x86_64 binary (using Windows instruction emulation) and the Arm64 native binary on a Windows on Arm computer.
1313

1414
## Download the packages
15-
16-
You don't need to build FFmpeg from scratch—just grab the ready-made binaries and get started.
15+
You don't need to compile FFmpeg from source. You can download the pre-built binaries to begin your testing:
1716

1817
- First, download the [FFmpeg x86_64 package](https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2025-07-31-14-15/ffmpeg-n7.1.1-56-gc2184b65d2-win64-gpl-7.1.zip).
1918
- Next, download the [FFmpeg Arm64 native package](https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2025-07-31-14-15/ffmpeg-n7.1.1-56-gc2184b65d2-winarm64-gpl-7.1.zip).
@@ -23,20 +22,19 @@ You don't need to build FFmpeg from scratch—just grab the ready-made binaries
2322
Once you've downloaded both packages, unzip them. You'll find the binaries in the `bin` folder inside each package. The x86_64 version is for emulation, while the Arm64 version runs natively on your Windows on Arm device. Double-check the folder names so you don't mix them up.
2423

2524
{{% notice Note %}}
26-
It's a good idea to create a separate folder for each version. Make a note of where you put both `ffmpeg.exe` and `ffplay.exe` for each versionyou'll need these paths soon to run your tests and compare results.
25+
It's a good idea to create a separate folder for each version. Make a note of where you put both `ffmpeg.exe` and `ffplay.exe` for each version as you'll need these paths soon to run your tests and compare results.
2726
{{% /notice %}}
2827

2928
Now you're set up with both versions of FFmpeg. Next, you'll use these binaries to encode a video and see how each one performs.
3029

3130
## Download the video source
3231

33-
For this test, you'll use a sample video called RaceNight. Download it from [this public dataset](https://ultravideo.fi/video/RaceNight_3840x2160_50fps_420_8bit_YUV_RAW.7z).
32+
For this test, you'll use a sample video called RaceNight. Download it from this [RaceNight public dataset](https://ultravideo.fi/video/RaceNight_3840x2160_50fps_420_8bit_YUV_RAW.7z).
3433

3534
Unzip the package and make a note of the path to the `.yuv` file inside.
3635

3736
## Encode the video
38-
39-
The video you just downloaded is in YUV raw format, which means it's uncompressed and doesn't need decoding to play. To really test your system, you'll use FFmpeg to compress the video with the x265 encoder and convert it to an `.mp4` file.
37+
The video you downloaded is in `.yuv` raw format. This means it's uncompressed and ready for processing, so no decoding step is needed. To test your system's performance, you'll use FFmpeg to compress the video with the x265 encoder and convert it to an `.mp4` file. This workflow lets you measure how efficiently each FFmpeg binary handles video encoding on your Windows on Arm device.
4038

4139
Assuming everything is in your current directory, open a terminal and run this command:
4240

@@ -45,10 +43,10 @@ ffmpeg-n7.1.1-56-gc2184b65d2-win64-gpl-7.1\ffmpeg-n7.1.1-56-gc2184b65d2-win64-gp
4543
```
4644

4745
{{% notice Note %}}
48-
Make sure to update the paths to `ffmpeg.exe` and the YUV video file to match where you saved them.
46+
Make sure to update the paths to `ffmpeg.exe` and the `yuv.` video file to match where you saved them.
4947
{{% /notice %}}
5048

51-
This command resizes the video and compresses it into an MP4 file using H.265 encoding (via the x265 encoder). The `-benchmark` option shows performance stats while the encoding runs. When it's done, you'll have a new file called `RaceNight_1080p.mp4`.
49+
This command resizes the video and compresses it into an MP4 file using H.265 encoding (using the x265 encoder). The `-benchmark` option shows performance stats while the encoding runs. When it's done, you'll have a new file called `RaceNight_1080p.mp4`.
5250

5351
Try running the command with both the x86_64 and Arm64 versions of FFmpeg. Then, compare the results to see which one is faster.
5452

@@ -104,7 +102,7 @@ x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
104102
encoded 600 frames in 26.20s (22.90 fps), 9110.78 kb/s, Avg QP:27.23
105103
```
106104

107-
Check out the last line in each output—the run time and frames per second show how each build performed. The Arm64 version is much faster, thanks to running natively on your hardware.
105+
Check out the last line in each output. The run time and frames per second show how each build performed. The Arm64 version is much faster, thanks to running natively on your hardware.
108106

109107
## Review your progress and compare performance
110108

content/learning-paths/laptops-and-desktops/win-resource-ps1/how-to-2.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ weight: 3
66
layout: learningpathall
77
---
88

9-
## Sample video decoding resource usage
9+
## Analyze resource usage during sample video decoding
1010

11-
To monitor resource usage during video decoding, use the following PowerShell script. This script starts the decoding process, periodically records CPU and memory statistics, and saves the results to a CSV file for analysis.
1211

13-
Open your code editor, copy the content below, and save it as `sample_decoding.ps1`.
12+
To monitor resource usage during video decoding, use the following PowerShell script. This script starts the decoding process, periodically records CPU and memory statistics, and then saves the results to a CSV file for analysis.
13+
14+
Open your code editor, copy the content below, and save it as `sample_decoding.ps1`:
1415

1516
```PowerShell { line_numbers = true }
1617
param (
@@ -114,24 +115,23 @@ Run the script:
114115
Set-ExecutionPolicy -Scope Process RemoteSigned
115116
.\sample_decoding.ps1
116117
```
117-
118-
A video starts playing and completes in 3 minutes. When finished, you can find the results file `usage_log.csv` in the current directory.
118+
When you run the script, the video plays for about three minutes. After playback finishes, you'll find the results file named `usage_log.csv` in your current directory. Open this file with a spreadsheet application to review and analyze the recorded resource usage data.
119119

120120
{{% notice Note %}}
121-
Script execution may be blocked due to security policy configuration. The `Set-ExecutionPolicy` command allows local scripts to run during this session.
121+
Script execution might be blocked due to security policy configuration. The `Set-ExecutionPolicy` command allows local scripts to run during this session.
122122
{{% /notice %}}
123123

124-
### Script explanation
124+
## Understand what the script does
125125

126126
The `param` section defines variables including the binary path, video playback arguments, sampling interval, and result file path. You can modify these values as needed.
127127

128-
Lines 15-26 check and modify the binary file attributes. The binaries in use are downloaded from the web and may be blocked from running due to lack of digital signature. These lines unlock the binaries.
128+
Lines 1526 check whether the binary file is blocked by Windows security settings. When you download executables from the web, Windows may prevent them from running if they lack a digital signature. This section attempts to unlock the binary using the `Unblock-File` command, allowing the script to run the application without security restrictions.
129129

130130
Line 41 retrieves all child processes of the main process. The statistical data includes resources used by all processes spawned by the main process.
131131

132132
The `while` section collects CPU and memory usage periodically until the application exits. The CPU usage represents accumulated time that the process runs on the CPU. The memory usage shows the size of memory occupation with or without shared spaces accounted for.
133133

134-
### View results
134+
### View the results
135135

136136
The output below shows the results from running the x86_64 version of `ffplay.exe`:
137137

@@ -150,5 +150,4 @@ Timestamp,CPU Sum (s),Memory Sum (MB),Memory Private Sum (MB),CPU0 (s),Memory0 (
150150
......
151151
2025-08-18T10:39:01.7856168+08:00,329.109375,352.53,339.96,329.09375,340.23046875,338.20703125,0.015625,12.30078125,1.75390625
152152
```
153-
154-
The sample result file uses CSV (comma-separated values) format. You can open it with spreadsheet applications like Microsoft Excel for better visualization and create charts for data analysis.
153+
The sample result file is in CSV (comma-separated values) format. Open it with a spreadsheet application such as Microsoft Excel to view the data in a table. You can use built-in chart tools to visualize CPU and memory usage over time, making it easier to spot trends and compare performance between Arm64 and x86_64 versions.

content/learning-paths/laptops-and-desktops/win-resource-ps1/how-to-3.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Measure power usage
2+
title: Measure power usage on Windows on Arm with PowerShell
33
weight: 4
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9-
## Sampling battery status
9+
## Sample the battery status
1010

1111
Querying battery status provides a way to measure power usage without an external power meter. Battery monitoring is also convenient because data collection and logging can be automated.
1212

@@ -77,7 +77,7 @@ A video starts playing and completes in 30 minutes. When finished, you can find
7777

7878
The script collects remaining battery capacity and discharge rate periodically. You can track the battery remaining capacity to understand the power consumption patterns.
7979

80-
### View results
80+
### View the results
8181

8282
The output below shows the results from running the x86_64 version of `ffplay.exe`:
8383

@@ -100,3 +100,7 @@ Timestamp,RemainingCapacity(mWh),DischargeRate(mW)
100100
The sample results file is in CSV format. You can open it with spreadsheet applications like Microsoft Excel for better visualization and to plot data analysis charts.
101101

102102
Battery monitoring provides an effective way to measure power consumption differences between x86_64 and native Arm64 applications. By comparing discharge rates, you can quantify the power efficiency advantages that Arm processors typically demonstrate for video decoding workloads.
103+
104+
## Wrapping up and next steps
105+
106+
You’ve measured power usage on your Windows on Arm device and can now compare results across builds to see how native Arm64 performance affects battery life. Sharing your findings with the Arm developer community helps others optimize applications for Windows on Arm.

0 commit comments

Comments
 (0)