Skip to content

Home > @esengine/ecs-framework-monorepo > PerformanceMonitor

PerformanceMonitor class

高性能监控器 用于监控ECS系统的性能表现,提供详细的分析和优化建议

Signature:

typescript
export declare class PerformanceMonitor

Properties

Property

Modifiers

Type

Description

instance

static

readonly

PerformanceMonitor

获取单例实例

isEnabled

readonly

boolean

检查是否启用了性能监控

Methods

Method

Modifiers

Description

disable()

禁用性能监控

enable()

启用性能监控

endMonitoring(systemName, startTime, entityCount)

结束监控并记录性能数据

getAllSystemData()

获取所有系统的性能数据

getAllSystemStats()

获取所有系统的统计信息

getPerformanceReport()

获取性能报告

getPerformanceWarnings(thresholdMs)

获取性能警告

getSystemData(systemName)

获取系统的当前性能数据

getSystemStats(systemName)

获取系统的统计信息

reset()

重置所有性能数据

resetSystem(systemName)

重置指定系统的性能数据

setMaxRecentSamples(maxSamples)

设置最大保留样本数

startMonitoring(systemName)

开始监控系统性能

基于 MIT 许可证发布