setStatistic
Sets the statistic object to use in the specified statistic slot. This function applies to both Components and SubComponents. See Statistic Objects for additional functions that can be used on statistic objects.
Syntax
component.setStatistic(stat_name, stat_obj=None)
Parameters
- stat_name Name of the statistic that will be set
- stat_obj Statistic object that will be used for the named statistic slot. If no stat object is specified, a new one will be created and returned.
- returns Statistic object loaded into the specified statistic slot.
Example
import sst
component0 = sst.Component("c0", "simpleElementExample.example1")
stat = component0.setStatistic("EventSizeReceived")
Import
import sst