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.

sort_records(records)[source]

Resort the records according to the current settings.

sorter(record)[source]

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.

Parameters
  • name (str) – Name of a view element

  • view_element (ViewElement) – View element to associate

Returns

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_stats(stats)[source]

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.

get_callee_map(records)[source]

Create a callee map.

goto_record(event)[source]
records_from_stats(stats)[source]

Create a list of records from a stats dictionary.

update_sub_results(event)[source]
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.

create_stats()[source]
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.

enable.savage.compliance.sike.get_profile_editor(adapter)[source]
enable.savage.compliance.sike.main()[source]