Component for tracking state changes and calculating utilization statistics. More...
Public Member Functions | |
| void | State (string newState) |
| Set a new state. | |
| string | GetCurrentState () |
| Get the current state name. | |
| void | ResetStatistics () |
| Reset all statistics. | |
| float | GetUtilization01 () |
| Returns utilization as a float between 0 and 1. | |
| float | GetUtilizationPercent () |
| Returns utilization in percent (0-100). | |
| float | GetStatePercentage (string state) |
| Get the percentage of time spent in a specific state. | |
| float | GetStateDuration (string state) |
| Get the duration spent in a specific state. | |
| Dictionary< string, float > | GetAllStatePercentages () |
| Get all state percentages as a dictionary. | |
| void | StatReset () |
| string | GetDisplay () |
| string | GetDetailedReport () |
| Get a detailed report of all statistics for debugging. | |
| void | LogStatistics () |
| Log the current statistics to the console. | |
Properties | |
| List< string > | FreeStates [get, set] |
| List of states considered as 'free' (not utilized) | |
| float | UtilizationPercent [get] |
| Current utilization percentage (0-100) | |
| List< string > | TrackedStates [get] |
| List of tracked state names. | |
| List< float > | TrackedDurations [get] |
| List of tracked state durations in seconds. | |
| List< float > | TrackedPercentages [get] |
| List of tracked state percentages (0-100) | |
Detailed Description
Component for tracking state changes and calculating utilization statistics.
Uses the unified StateStatistics system for consistent state tracking across the framework.
Member Function Documentation
◆ GetAllStatePercentages()
| Dictionary< string, float > realvirtual.StatStates.GetAllStatePercentages | ( | ) |
Get all state percentages as a dictionary.
◆ GetCurrentState()
| string realvirtual.StatStates.GetCurrentState | ( | ) |
Get the current state name.
◆ GetDetailedReport()
| string realvirtual.StatStates.GetDetailedReport | ( | ) |
Get a detailed report of all statistics for debugging.
◆ GetDisplay()
| string realvirtual.StatStates.GetDisplay | ( | ) |
Implements realvirtual.IStatDisplay.
◆ GetStateDuration()
| float realvirtual.StatStates.GetStateDuration | ( | string | state | ) |
Get the duration spent in a specific state.
◆ GetStatePercentage()
| float realvirtual.StatStates.GetStatePercentage | ( | string | state | ) |
Get the percentage of time spent in a specific state.
◆ GetUtilization01()
| float realvirtual.StatStates.GetUtilization01 | ( | ) |
Returns utilization as a float between 0 and 1.
◆ GetUtilizationPercent()
| float realvirtual.StatStates.GetUtilizationPercent | ( | ) |
Returns utilization in percent (0-100).
◆ LogStatistics()
| void realvirtual.StatStates.LogStatistics | ( | ) |
Log the current statistics to the console.
◆ ResetStatistics()
| void realvirtual.StatStates.ResetStatistics | ( | ) |
Reset all statistics.
◆ State()
| void realvirtual.StatStates.State | ( | string | newState | ) |
Set a new state.
◆ StatReset()
| void realvirtual.StatStates.StatReset | ( | ) |
Implements realvirtual.IStatReset.
Property Documentation
◆ FreeStates
|
getset |
List of states considered as 'free' (not utilized)
◆ TrackedDurations
|
get |
List of tracked state durations in seconds.
◆ TrackedPercentages
|
get |
List of tracked state percentages (0-100)
◆ TrackedStates
|
get |
List of tracked state names.
◆ UtilizationPercent
|
get |
Current utilization percentage (0-100)