You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## [2.4.1] - 2020-11-05
Metadata collection was made public
## [2.4.0] - 2020-09-16
Upgrade json dependency to release version
Reduced overhead introduced when running tests
Performance Test Report window updates:
Added CSV export option.
Added monitoring of results file timestemp to support auto refresh when a new file is found.
Added display of timestamp of last loaded results file.
Added option to sort test report window by order the tests ran in (index). This is now the default.
Added min and max to the table.
Improve titles and tooltips on columns
## [2.3.1] - 2020-07-01
Fix overhead introduced with Measure.Method no longer calculates execution time of Setup and Cleanup changes
Copy file name to clipboardExpand all lines: Documentation~/index.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,19 @@ The Performance Testing Extension is intended to be used with, and complement, t
11
11
12
12
To install the Performance Testing Extension package
13
13
1. Open the `manifest.json` file for your Unity project (located in the YourProject/Packages directory) in a text editor
14
-
2. Add `"com.unity.test-framework.performance": "2.3.1-preview",` to the dependencies
14
+
2. Add `"com.unity.test-framework.performance": "2.4.0",` to the dependencies
15
15
3. Save the manifest.json file
16
16
4. Verify the Performance Testing Extension is now installed opening the Unity Package Manager window
17
17
18
18
To access performance testing apis add `Unity.PerformanceTesting` to your assembly definition references section.
19
19
20
+
Performance package will need to be preserved in link.xml file if Managed stripping level is enabled in Player settings. This is nesesarry for console and mobile platforms.
**[Performance]** - Use this with `Test` and `UnityTest` attributes. It will initialize necessary test setup for performance tests.
@@ -61,6 +68,9 @@ This will execute the provided method, sampling performance using the following
61
68
***IterationsPerMeasurement(int n)** - number of method executions per measurement to use. If this value is not specified, the method will be executed as many times as possible until approximately 100 ms has elapsed.
62
69
***SampleGroup(string name)** - by default the measurement name will be "Time", this allows you to override it
63
70
***GC()** - if specified, will measure the total number of Garbage Collection allocation calls.
71
+
***SetUp(Action action)** - is called every iteration before executing the method. Setup time is not measured.
72
+
***CleanUp(Action action)** - is called every iteration after the execution of the method. Cleanup time is not measured.
73
+
64
74
65
75
#### Example 1: Simple method measurement using default values
66
76
@@ -83,6 +93,8 @@ public void Test()
83
93
.MeasurementCount(10)
84
94
.IterationsPerMeasurement(5)
85
95
.GC()
96
+
.SetUp(()=> {/*setup code*/})
97
+
.CleanUp(()=> {/*cleanup code*/})
86
98
.Run();
87
99
}
88
100
```
@@ -177,7 +189,7 @@ public void Test()
177
189
178
190
### Measure.ProfilerMarkers()
179
191
180
-
Used to record profiler markers. Profiler marker timings will be recorded automatically and sampled within the scope of the `using` statement. Names should match profiler marker labels. Note that deep and editor profiling are not available. Profiler markers created using `Profiler.BeginSample()` are not supported, switch to `ProfilerMarker` if possible.
192
+
Used to record profiler markers. Profiler marker timings will be recorded automatically and sampled within the scope of the `using` statement. Names should match profiler marker labels. Profiler markers are sampled once per frame. Sampling the same profiler marker per frame will result in the sum of all invocations. Note that deep and editor profiling is not available. Profiler markers created using `Profiler.BeginSample()` are not supported, switch to `ProfilerMarker` if possible.
181
193
182
194
#### Example 1: Measuring profiler markers in a scope
183
195
@@ -560,4 +572,4 @@ For compairing performance data between runs use [Unity Performance Benchmark Re
0 commit comments