@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
61 lines (60 loc) • 2.06 kB
TypeScript
import { PerfCounter } from "../Misc/perfCounter.js";
import type { Nullable } from "../types.js";
import type { IDisposable } from "../scene.js";
import type { AbstractEngine } from "../Engines/abstractEngine.js";
/**
* This class can be used to get instrumentation data from a Babylon engine
* @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#engineinstrumentation
*/
export declare class EngineInstrumentation implements IDisposable {
/**
* Define the instrumented engine.
*/
engine: AbstractEngine;
private _captureGPUFrameTime;
private _captureShaderCompilationTime;
private _shaderCompilationTime;
private _onBeginFrameObserver;
private _onEndFrameObserver;
private _onBeforeShaderCompilationObserver;
private _onAfterShaderCompilationObserver;
/**
* Gets the perf counter used for GPU frame time
*/
get gpuFrameTimeCounter(): Nullable<PerfCounter>;
/**
* Gets the GPU frame time capture status
*/
get captureGPUFrameTime(): boolean;
/**
* Enable or disable the GPU frame time capture
*/
set captureGPUFrameTime(value: boolean);
/**
* Gets the perf counter used for shader compilation time
*/
get shaderCompilationTimeCounter(): PerfCounter;
/**
* Gets the shader compilation time capture status
*/
get captureShaderCompilationTime(): boolean;
/**
* Enable or disable the shader compilation time capture
*/
set captureShaderCompilationTime(value: boolean);
/**
* Instantiates a new engine instrumentation.
* This class can be used to get instrumentation data from a Babylon engine
* @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#engineinstrumentation
* @param engine Defines the engine to instrument
*/
constructor(
/**
* Define the instrumented engine.
*/
engine: AbstractEngine);
/**
* Dispose and release associated resources.
*/
dispose(): void;
}