Documentation ¶
Overview ¶
Package stats provides the structs returned by ecs.World.Stats().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchetypeStats ¶
type ArchetypeStats struct { // Whether the archetype is currently active IsActive bool // Number of entities in the archetype Size int // Capacity of the archetype Capacity int // Total reserved memory for entities and components, in bytes Memory int }
ArchetypeStats provide statistics for an archetype.
type EntityStats ¶
type EntityStats struct { // Currently used/alive entities Used int // Current capacity of the entity pool Total int // Recycled/available entities Recycled int // Current capacity of the entities list Capacity int }
EntityStats provide statistics about [ecs.World] entities.
func (*EntityStats) String ¶
func (s *EntityStats) String() string
type NodeStats ¶ added in v0.8.0
type NodeStats struct { // Total number of archetypes, incl. inactive. ArchetypeCount int // Number of active archetypes. ActiveArchetypeCount int // Whether the node is active and contains archetypes. IsActive bool // Whether the node contains relation archetypes. HasRelation bool // Number of components Components int // Component IDs ComponentIDs []uint8 // Component types for ComponentIDs ComponentTypes []reflect.Type // Memory for components per entity MemoryPerEntity int // Total reserved memory for entities and components, in bytes Memory int // Number of entities in the archetype Size int // Capacity of the archetype Capacity int // Archetype statistics Archetypes []ArchetypeStats }
NodeStats provide statistics for an archetype graph node.
type WorldStats ¶
type WorldStats struct { // Entity statistics Entities EntityStats // Total number of components ComponentCount int // Component types, indexed by component ID ComponentTypes []reflect.Type // Locked state of the world Locked bool // Node statistics Nodes []NodeStats // Number of active nodes ActiveNodeCount int // Memory used by entities and components Memory int // Number of cached filters CachedFilters int }
WorldStats provide statistics for an [ecs.World].
func (*WorldStats) String ¶
func (s *WorldStats) String() string
Click to show internal directories.
Click to hide internal directories.