docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Show / Hide Table of Contents
    • AddCollectorMenuAttribute
  • Unity.Simulation
    • AggregatedSample
    • AggregationEvent
    • ArrayCast
    • ArrayUtilities
    • AsyncRequest
    • AsyncRequest.ExecutionContext
    • AsyncRequest.Result
    • AsyncRequest.State
    • AsyncRequest<T>
    • BaseDataConsumer<T>
    • BaseDataConsumer<T>.Uploadable
    • Category
    • ChunkedStream
    • ChunkedUnityLog
    • CollectorBase
    • CollectorBase.ConsumeCollectorReport
    • CollectorElement
    • CollectorsBaseEditor
    • CollectorsList
    • Configuration
    • Configuration.SimulationConfiguration
    • ContentType
    • ContinuousEvents
    • ContinuousEvents.EventCollectionDelegate
    • ContinuousEvents.EventDispatchDelegate
    • CoreProfilerUtils
    • CounterEvent
    • CounterEventData
    • DXChunkedStream
    • DXChunkedUnityLog
    • DXFile
    • DXFormat
    • DXManager
    • DXTimeLogger
    • DataCapturePaths
    • DirectoryNameComponent
    • Dispatcher
    • EventBase
    • ExecUtility
    • ExitPlaymode
    • ExtensionNameComponent
    • FileNameComponent
    • FileProducer
    • Format
    • FrameCountCondition
    • FrameLimit
    • FrameNumberNameComponent
    • ICondition
    • IDataProduced
    • IGlobalProfilerDataDispatcher
    • IgnoreCollectorAttribute
    • LabelNameComponent
    • LambdaJob
    • LambdaJob.DelegateType
    • Log
    • Log.Level
    • Manager
    • Manager.NotificationDelegate
    • Manager.TickDelegate
    • NameComponent
    • NameGenerator
    • Options
    • PackageImportTests
    • PathUtility
    • PerfStatsManager
    • PlayerResolution
    • PlayerResolutionSettings
    • ProfilerManager
    • ProfilerProperties
    • ProfilerReport
    • ProfilerSamplingEvent
    • ReportingUtils
    • Sample
    • SampleProfilerCollector
    • SequenceNameComponent
    • SequencedPathName
    • SignedURLDataConsumer
    • SimSecondsCondition
    • SimulationProfiler
    • SimulationProfilerBase
    • SimulationProfilerEditor
    • TestUtility
    • ThreadUtility
    • TimeLimit
    • TimeLogger
    • TimeScale
    • TimeScaleEditor
    • TimeUtility
    • Timer
    • TimerSource
    • TimestampNameComponent
    • WallSecondsCondition

Class PerfStatsManager

Inheritance
object
PerfStatsManager
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
public class PerfStatsManager

Fields

DEFAULT_ERROR_SAMPLE_VALUE

Declaration
public double DEFAULT_ERROR_SAMPLE_VALUE
Field Value
Type Description
double

realTimeSinceStartUp

Declaration
public float realTimeSinceStartUp
Field Value
Type Description
float

Properties

Instance

PerfStatsManager singleton instance to that can enable Start/Stop invoking the collectors.

Declaration
public static PerfStatsManager Instance { get; }
Property Value
Type Description
PerfStatsManager

Methods

BeginSample(string, Type)

Begin sample for the provided event.

Declaration
public void BeginSample(string eventName, Type associatedCollectorType)
Parameters
Type Name Description
string eventName
Type associatedCollectorType

DispatchCollectors(bool)

Invoke this function to flush all the events on all the collectors. This will invoke dispatcher on all the collectors. This call can be slow depending upon the dispatcher implementation.

Declaration
public void DispatchCollectors(bool shuttingDown = false)
Parameters
Type Name Description
bool shuttingDown

EndSample(string, Type)

End Sample for the provided event.

Declaration
public void EndSample(string eventName, Type associatedCollectorType)
Parameters
Type Name Description
string eventName
Type associatedCollectorType

SetGlobalDispatchers(List<IGlobalProfilerDataDispatcher>)

Declaration
public void SetGlobalDispatchers(List<IGlobalProfilerDataDispatcher> dispatchers)
Parameters
Type Name Description
List<IGlobalProfilerDataDispatcher> dispatchers

StartProfiling(List<CollectorBase>)

Invoke this method to start profiling by invoking/activating collectors.

Declaration
public void StartProfiling(List<CollectorBase> collectors)
Parameters
Type Name Description
List<CollectorBase> collectors

StopProfiling()

Inovke this method to stop profiling.

Declaration
public void StopProfiling()

TrackAPIUsage(string, Type)

Track API usage for the provided function.

Declaration
public void TrackAPIUsage(string functionName, Type associatedColletorType)
Parameters
Type Name Description
string functionName
Type associatedColletorType
In This Article
Back to top
Copyright © 2026 Unity Technologies — Trademarks and terms of use
  • Legal
  • Privacy Policy
  • Cookie Policy
  • Do Not Sell or Share My Personal Information