Skip to content

Commit 84b9b40

Browse files
author
Unity Technologies
committed
com.unity.test-framework.performance@3.0.1
## [3.0.1] - 2023-06-23 ### Changed - Removed false "unityRelease" field from package.json ## [3.0.0] - 2023-06-05 ### Added - "Open Source Code" menu item to test results - Test Filter to filter results by test name ### Changed - Items in test results are grouped by classname - Make Sample Groups to be shown only when clicking on items with them - "New Data available" label re-located - Replaced CamelCase headers with regular text headers in csv report - Replaced TRUE/FALSE with Yes/No in the "Increase Is Better" column in csv report - Renamed the default report name to PerformanceTestResults - Documentation updates to reflect API changes ### Fixed - Median calculation in case of even number of samples - Deviation division by zero - Exception thrown after clicking Cancel button (during Test Result export) - The issue where the last column was always empty in csv report
1 parent ee66a84 commit 84b9b40

20 files changed

+484
-274
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## [3.0.1] - 2023-06-23
4+
### Changed
5+
- Removed false "unityRelease" field from package.json
6+
7+
## [3.0.0] - 2023-06-05
8+
### Added
9+
- "Open Source Code" menu item to test results
10+
- Test Filter to filter results by test name
11+
### Changed
12+
- Items in test results are grouped by classname
13+
- Make Sample Groups to be shown only when clicking on items with them
14+
- "New Data available" label re-located
15+
- Replaced CamelCase headers with regular text headers in csv report
16+
- Replaced TRUE/FALSE with Yes/No in the "Increase Is Better" column in csv report
17+
- Renamed the default report name to PerformanceTestResults
18+
- Documentation updates to reflect API changes
19+
### Fixed
20+
- Median calculation in case of even number of samples
21+
- Deviation division by zero
22+
- Exception thrown after clicking Cancel button (during Test Result export)
23+
- The issue where the last column was always empty in csv report
24+
325
## [3.0.0-pre.2] - 2023-04-06
426
### Added
527
- Help button, which redirects the user to documentation website
69.2 KB
Loading
-23.5 KB
Loading
-80.7 KB
Binary file not shown.

Documentation~/index.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,27 @@ Install the Performance Testing Extension package using one of the following met
1515

1616
Example:
1717
1. Open the `manifest.json` file for your Unity project (located in the YourProject/Packages directory) in a text editor.
18-
2. Add `"com.unity.test-framework.performance": "3.0.0-pre.2",` to the dependencies.
18+
2. Add `"com.unity.test-framework.performance": "3.0.0-pre.3",` to the dependencies.
1919
3. Save the manifest.json file.
2020
4. Verify the Performance Testing Extension is now installed by opening the Unity Package Manager window.
2121

2222
When the package is installed, add a reference to `Unity.PerformanceTesting` in your assembly definition to access the performance testing APIs.
2323

24+
![Performance test example01](images/example04.png)
25+
26+
2427
## Unity version compatibility
2528

2629
Unity releases can often include changes that break compatibility with the Performance Testing Extension, so we cannot currently guarantee latest package version compatability with every Unity version. The table below shows which version of the package is compatible with which Unity release streams.
2730

2831
| Unity stream | Package version |
2932
| ------------------------- |-----------------|
30-
| 2023.2 | 3.0.0-pre.2 |
31-
| 2023.1 | 3.0.0-pre.2 |
32-
| 2022.2 | 3.0.0-pre.2 |
33-
| 2022.1 | 3.0.0-pre.2 |
34-
| 2021.3 | 3.0.0-pre.2 |
35-
| 2020.3 | 3.0.0-pre.2 |
33+
| 2023.2 | 3.0.1 |
34+
| 2023.1 | 3.0.1 |
35+
| 2022.2 | 3.0.1 |
36+
| 2022.1 | 3.0.1 |
37+
| 2021.3 | 3.0.1 |
38+
| 2020.3 | 3.0.1 |
3639
| 2019.4 | 2.8.1-preview |
3740

3841
## Tips

Documentation~/measure-custom.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ When you want to record samples outside of frame time, method time, or profiler
88
[Test, Performance]
99
public void Test()
1010
{
11-
SampleGroup samplegroup = new SampleGroup("TotalAllocatedMemory", SampleUnit.Megabyte, false);
12-
var allocatedMemory = Profiler.GetTotalAllocatedMemoryLong() / 1048576f
13-
Measure.Custom(samplegroup, allocatedMemory);
14-
11+
SampleGroup sampleGroup = new SampleGroup("TotalAllocatedMemory", SampleUnit.Megabyte, false);
12+
var allocatedMemory = UnityEngine.Profiling.Profiler.GetTotalAllocatedMemoryLong() / 1048576f;
13+
Measure.Custom(sampleGroup, allocatedMemory);
1514
}
1615
```

Documentation~/viewing-results.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Time Microsecond Median:2018.60 Min:1903.00 Max:2819.80 Avg:2186.35 Std:368.42 S
1111

1212
## The Performance Test Report
1313

14-
The Performance Test Report (**Window > Analysis > Performance Test Report**) shows a detailed breakdown of individual test runs. This can be used to assess the stability of each test. It provides a visualization of each individual sample recorded within a sample group along with summary statistics for the selected test.
14+
The Performance Test Report (**Window > General > Performance Test Report**) shows a detailed breakdown of individual test runs. This can be used to assess the stability of each test. It provides a visualization of each individual sample recorded within a sample group along with summary statistics for the selected test.
1515

1616
The Performance Test Report is split into two views: the *test view* and the *sample group view*.
1717

18-
**Test View:** Provides a list of all tests. Each of the columns can be clicked to sort the view. Column values show the sample group with highest deviation.
18+
**Test View:** Provides a list of all tests. Tests are separated by class names. Each of the columns can be clicked to sort the view. Column values show the sample group with highest deviation.
1919

2020
* *Name* - Name of the test.
2121
* *Deviation* - The deviation is calculated by dividing the standard deviation by the median for a sample group. It shows the sample group with the highest 'deviation' value. Useful for defining stability of the test.

Documentation~/writing-tests.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ public void Empty()
117117

118118
using (Measure.Scope())
119119
{
120-
Measure.Custom(allocated, Profiler.GetTotalAllocatedMemoryLong() / 1048576f);
121-
Measure.Custom(reserved, Profiler.GetTotalReservedMemoryLong() / 1048576f);
120+
Measure.Custom(allocated, UnityEngine.Profiling.Profiler.GetTotalAllocatedMemoryLong() / 1048576f);
121+
Measure.Custom(reserved, UnityEngine.Profiling.Profiler.GetTotalReservedMemoryLong() / 1048576f);
122122
}
123123
}
124124
```
@@ -208,9 +208,10 @@ For comparing performance data between runs, use the [Unity Performance Benchmar
208208
[UnityTest, Performance]
209209
public IEnumerator Rendering_SampleScene()
210210
{
211-
using(Measure.Scope("Setup.LoadScene"))
211+
using(Measure.Scope("LoadScene"))
212212
{
213-
SceneManager.LoadScene("SampleScene");
213+
// Add scene to Build Settings before running test
214+
SceneManager.LoadScene("SampleScene");
214215
}
215216
yield return null;
216217

@@ -226,7 +227,7 @@ For comparing performance data between runs, use the [Unity Performance Benchmar
226227
{
227228
var allocated = new SampleGroup("TotalAllocatedMemory", SampleUnit.Megabyte);
228229
var reserved = new SampleGroup("TotalReservedMemory", SampleUnit.Megabyte);
229-
Measure.Custom(allocated, Profiler.GetTotalAllocatedMemoryLong() / 1048576f);
230-
Measure.Custom(reserved, Profiler.GetTotalReservedMemoryLong() / 1048576f);
230+
Measure.Custom(allocated, UnityEngine.Profiling.Profiler.GetTotalAllocatedMemoryLong() / 1048576f);
231+
Measure.Custom(reserved, UnityEngine.Profiling.Profiler.GetTotalReservedMemoryLong() / 1048576f);
231232
}
232233
```

0 commit comments

Comments
 (0)