docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SampleGroup

    Represents a performance test sample group.

    Inheritance
    object
    SampleGroup
    Implements
    IDeserializationCallback
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    Implements

    IDeserializationCallback
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)