Class SampleGroup
Represents a performance test sample group.
Inherited Members
Namespace: Unity.PerformanceTesting
Syntax
[Serializable]
public class SampleGroup : IDeserializationCallback
Constructors
SampleGroup(String, SampleUnit, Boolean)
Creates a new sample group with given parameters.
Declaration
public SampleGroup(string name, SampleUnit unit = SampleUnit.Millisecond, bool increaseIsBetter = false)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the sample group. |
SampleUnit | unit | Unit of measurement. |
Boolean | increaseIsBetter | Whether the measurement is inverted and increase is positive. |
Exceptions
Type | Condition |
---|---|
PerformanceTestException | Exception can be thrown if empty or null name is provided. |
Fields
Average
Average value of samples.
Declaration
public double Average
Field Value
Type | Description |
---|---|
Double |
IncreaseIsBetter
Whether the measurement is inverted and increase is positive.
Declaration
public bool IncreaseIsBetter
Field Value
Type | Description |
---|---|
Boolean |
Max
Maximum value of samples.
Declaration
public double Max
Field Value
Type | Description |
---|---|
Double |
Median
Medina value of samples.
Declaration
public double Median
Field Value
Type | Description |
---|---|
Double |
Min
Minimum value of samples.
Declaration
public double Min
Field Value
Type | Description |
---|---|
Double |
Name
Name of the sample group.
Declaration
public string Name
Field Value
Type | Description |
---|---|
String |
Samples
List of samples.
Declaration
public List<double> Samples
Field Value
Type | Description |
---|---|
List<Double> |
StandardDeviation
Standard deviation of samples.
Declaration
public double StandardDeviation
Field Value
Type | Description |
---|---|
Double |
Sum
Sum of samples.
Declaration
public double Sum
Field Value
Type | Description |
---|---|
Double |
Unit
Measurement unit.
Declaration
public SampleUnit Unit
Field Value
Type | Description |
---|---|
SampleUnit |
Methods
GetRecorder()
Gets the profiler recorder object.
Declaration
public Recorder GetRecorder()
Returns
Type | Description |
---|---|
Recorder | Profiler recorder. |
OnDeserialization(Object)
Validates the deserialized object.
Declaration
public void OnDeserialization(object sender)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | The object that initiated the deserialization process. |