bexchange.statistics package¶
Submodules¶
bexchange.statistics.statistics module¶
- class bexchange.statistics.statistics.simple_stat_plugin(spid, sptype, statmgr)[source]¶
Bases:
object
Simple statistics plugin that will call the stat mgrs increment function
- class bexchange.statistics.statistics.statistics_manager(db)[source]¶
Bases:
object
The statistics manager. Will create and register the statistics plugin
- get_statistics(nid, querydata)[source]¶
Returns the statistics for the specified post, origin and source_name
- get_statistics_entries(nid, querydata)[source]¶
Returns the statistic entries for the specified post, origin and source_name
- increment(spid, origin, meta, save_post=False, increment_counter=True, optime=0, optime_info=None)[source]¶
Increments a counter that is defined by: :param spid: The id used to identify this statistics post :param orgin: the origin (may be null, indicating unknown origin) :param meta: the metadata
- classmethod plugin_from_conf(conf, statmgr)[source]¶
Creates a stat plugin from the configuration :param conf: The config as a dictionary :param statmgr: The statistics manager to use :returns a stat plugin