# move mpegdash_service media component state from 'running' to 'stopping'
# move mpegdash_service media component state from 'running' to 'stopping'
...
@@ -305,39 +363,38 @@ class Sim(object):
...
@@ -305,39 +363,38 @@ class Sim(object):
:param state: state that's being reported
:param state: state that's being reported
"""
"""
state_stats={
# since no state has been finished, the generate_endpoint_config is called without any keyword arguments (field:value pairs) and only the tags for the current state are set
:param sample_count: - the total number of samples in the reporting period (TICK_TIME)
:param trans_sample_count: - the number of samples in the transition state
:param transition_state: name of transition state
:param next_state: name of next state
:return: the delay time
"""
state_stats={}
:param completed_states: states that have been completed
These are the state that have been completed over the sample period (could be more than 1). In terms of data format, a tuple of tuples.
Each completed state is a tuple if format (state, state_period, count), where state is the state's name, period is the total time the VM was in this state and count
is the number of times the VM was in this state (used to derive the average for the sample period.
E.g. ((booting, 5, 2), (booted, 2, 1)) - this is for transitions: booting(3s) -> booted(2s) -> booting(2s) -> booted(1s)
since booted is the last (current state), it is reported only once in the completed states tuple
# period of transition state is part of the total sample count multiplied by the reporting period (TICK_TIME)
:param next_state: name of next state (which is also the current state of the VM) - in the above example this would be booted.
:param next_state_time: the time the VM was in the next state (which is also the current state of the VM) - in the above example this would be 1 second.