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 Archetype ¶ added in v0.11.0
type Archetype 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 }
Archetype provide statistics for an archetype.
type Entities ¶ added in v0.11.0
type Entities 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 }
Entities provide statistics about [ecs.World] entities.
type Node ¶ added in v0.11.0
type Node 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, in bytes. MemoryPerEntity int // Total reserved memory for entities and components, in bytes. Memory int // Number of entities in the archetypes of this node. Size int // Sum of capacity of the archetypes in this node. Capacity int // Archetype statistics. Archetypes []Archetype }
Node provide statistics for an archetype graph node.
type World ¶ added in v0.11.0
type World struct { // Entity statistics. Entities Entities // 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 []Node // Number of active nodes, i.e. nodes with actual archetype(s). ActiveNodeCount int // Memory used by entities and components. Memory int // Number of cached filters. CachedFilters int }
World provide statistics for an [ecs.World].
Click to show internal directories.
Click to hide internal directories.