enable.savage.compliance.sike module

class enable.savage.compliance.sike.ProfileAdapter[source]

Bases: traitsui.tabular_adapter.TabularAdapter

Display profiling records in a TabularEditor.

class enable.savage.compliance.sike.ProfileResults[source]

Bases: traits.has_traits.HasTraits

Display profiling results.


Resort the records according to the current settings.


Return the appropriate sort key for sorting the records.

trait_view(name=None, view_element=None)[source]

Gets or sets a ViewElement associated with an object’s class.

If both name and view_element are specified, the view element is associated with name for the current object’s class. (That is, view_element is added to the ViewElements object associated with the current object’s class, indexed by name.)

If only name is specified, the function returns the view element object associated with name, or None if name has no associated view element. View elements retrieved by this function are those that are bound to a class attribute in the class definition, or that are associated with a name by a previous call to this method.

If neither name nor view_element is specified, the method returns a View object, based on the following order of preference:

  1. If there is a View object named traits_view associated with the current object, it is returned.

  2. If there is exactly one View object associated the current object, it is returned.

  3. Otherwise, it returns a View object containing items for all the non-event trait attributes on the current object.

  • name (str) – Name of a view element

  • view_element (ViewElement) – View element to associate


Return type

A view element.

class enable.savage.compliance.sike.Record(*args, **kwds)[source]

Bases: enable.savage.compliance.sike.Subrecord

The top-level profiling record of a function.

class enable.savage.compliance.sike.Sike[source]

Bases: traits.has_traits.HasTraits

Tie several profile-related widgets together.

Sike is like Gotcha, only less mature.


Add new statistics.

classmethod fromstats(stats, **traits)[source]

Instantiate an Sike from a Stats object, Stats.stats dictionary, or Profile object, or a filename of the saved Stats data.


Create a callee map.


Create a list of records from a stats dictionary.

class enable.savage.compliance.sike.SillyStatsWrapper(obj=None)[source]

Bases: object

Wrap any object with a .stats attribute or a .stats dictionary such that it can be passed to a Stats() constructor.

classmethod getstats(obj=None)[source]
class enable.savage.compliance.sike.Subrecord(*args, **kwds)[source]

Bases: enable.savage.compliance.sike.SuperTuple

The records referring to the calls a function makes.

property file
property func_name
property line
class enable.savage.compliance.sike.SuperTuple(*args, **kwds)[source]

Bases: tuple

Generic super-tuple using pre-defined attribute names.