trappy.stats.Indexer module

Indexers are responsible for providing indexes for aggregations and provide specific functions like unification and resampling.

class trappy.stats.Indexer.Indexer(index)[source]

Bases: object

Indexer base class is an encapsulation around the pandas Index object with some special functionality

Parameters:
  • index (pandas.Index) – Pandas index object. This can be non-unoform and non-unique
  • traces (trappy.trace.FTrace) – trappy FTrace list/singular object
get_uniform(delta=2.5e-05)[source]
Parameters:delta (float) – Difference between two indices. This has a default value specified in StatConf.DELTA_DEFAULT
Returns:A uniformly spaced index.
series()[source]

Returns an empty series with the initialized index

class trappy.stats.Indexer.MultiTriggerIndexer(triggers)[source]

Bases: trappy.stats.Indexer.Indexer

“The index unifies the indices of all trigger
events.
Parameters:triggers (trappy.stats.Trigger.Trigger) – A (list or single) trigger
trappy.stats.Indexer.get_unified_indexer(indexers)[source]

Unify the List of Indexers

Parameters:indexers (trappy.stats.Indexer.Indexer) – A list of indexers
Returns:A pandas.Indexer.Indexer with a unfied index