Class: kb.Statistics
| Defined in: | src/knockback-statistics/knockback-statistics.coffee |
Overview
kb.Statistics is an optional components that is useful for measuring your application's performance. You can record all of the Backbone.Events that have triggered ko.observable subscription updates and the memory footprint (instance count-only) of your ViewModels and collection observables.
kb.Statistics is not included in knockback.js nor knockback-core.js so you need to manually include it from the lib directory.
Instance Method Summary
- - (void) constructor() Constructor
- - (void) clear() Clear the tracked model events (but keep the registered objects intact)
- - (void) addModelEvent(event) Register a model event
- - (void) modelEventsStatsString() A debug helper to summarize the registered events in human-readable form
- - (void) register(key, obj) Register an object by key
- - (void) unregister(key, obj) Unregister an object by key
- - (Integer) registeredCount(type)
- - (String) registeredStatsString(success_message) A debug helper to summarize the current registered objects by key
Constructor Details
- (void) constructor()
Instance Method Details
- (void) clear()
Clear the tracked model events (but keep the registered objects intact)
- (void) addModelEvent(event)
Register a model event
- (void) modelEventsStatsString()
A debug helper to summarize the registered events in human-readable form
- (void) register(key, obj)
Register an object by key
- (void) unregister(key, obj)
Unregister an object by key
- (Integer) registeredCount(type)
- (String) registeredStatsString(success_message)
A debug helper to summarize the current registered objects by key