Class SampleGroup
Represents a performance test sample group.
Implements
Inherited Members
Namespace: Unity.PerformanceTesting
Assembly: Unity.PerformanceTesting.dll
Syntax
[Serializable]
public class SampleGroup : IDeserializationCallback
Constructors
SampleGroup(string, SampleUnit, bool)
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. |
bool | 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 |
---|---|
bool |
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. |