docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ScopeMeasurement

    Measures execution time for the given scope as a single time.

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.PerformanceTesting.Measurements
    Assembly: Unity.PerformanceTesting.dll
    Syntax
    public struct ScopeMeasurement : IDisposable

    Constructors

    ScopeMeasurement(string)

    Initializes a scope measurement.

    Declaration
    public ScopeMeasurement(string name)
    Parameters
    Type Name Description
    string name

    Sample group name used for measurements.

    ScopeMeasurement(SampleGroup)

    Initializes a scope measurement.

    Declaration
    public ScopeMeasurement(SampleGroup sampleGroup)
    Parameters
    Type Name Description
    SampleGroup sampleGroup

    Sample group used to save measurements.

    Methods

    Dispose()

    Stops scope measurement and adds it to provided sample group.

    Declaration
    public void Dispose()

    Implements

    IDisposable
    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)