setStatistic
Sets the statistic object to use in the specified statistic slot. This function applies to both Components and SubComponents. Use createStatistic
to create a statistic object before using this function. See Statistic Objects for additional functions that can be used on statistic objects.
Syntax
component.setStatistic(stat_name, stat_obj)
Parameters
- stat_name Name of the statistic that will be set
- stat_obj Statistic object that will be used for the named statistic slot.
- returns Statistic object loaded into the specified statistic slot.
Example
import sst
component0 = sst.Component("c0", "simpleElementExample.example1")
statobj = component0.createStatistic("StatObj")
stat = component0.setStatistic("EventSizeReceived", statobj) # Map "EventSizeReceived" -> "StatObj"
Import
import sst