
Classes | |
| interface | Group |
| class | LogEntry |
Static Public Member Functions | |
| static void | addDurationForKey (long duration, String group, String key) |
| static void | addDurationForKey (long duration, String key) |
| static NSSet< String > | aggregateKeys () |
| static NSArray< LogEntry > | aggregateLogEntries () |
| static void | initStatistics () |
| static void | initStatisticsIfNecessary () |
| static boolean | isTrackingStatistics () |
| static LogEntry | logEntryForKey (String group, String key) |
| static LogEntry | logEntryForKey (String key) |
| static void | logStatisticsForOperation (Logger statsLog, String operation) |
| static void | logStatisticsForOperation (String operation) |
| static void | markEnd (String key) |
| static void | markEnd (String group, String key) |
| static void | markStart (String key) |
| static void | markStart (String group, String key) |
| static synchronized void | reset () |
| static NSMutableDictionary < String, LogEntry > | statistics () |
| static boolean | traceCollectingEnabled () |
Static Public Attributes | |
| static final Logger | log = Logger.getLogger(ERXStats.class) |
| static final String | STATS_ENABLED_KEY = "er.extensions.erxStats.enabled" |
| static final String | STATS_TRACE_COLLECTING_ENABLED_KEY = "er.extensions.erxStats.traceCollectingEnabled" |
Static Private Member Functions | |
| static LogEntry | aggregateLogEntryForKey (String key) |
| static boolean | areStatisticsEnabled () |
| static String | makeKey (String group, String key) |
Static Private Attributes | |
| static NSMutableArray < NSMutableDictionary< String, LogEntry > > | _allStatistics = new NSMutableArray<NSMutableDictionary<String, LogEntry>>() |
| static final String | STATS_INITIALIZED_KEY = "er.extensions.erxStats.initialized" |
| static final String | STATS_KEY = "er.extensions.erxStats.statistics" |
| static final String | STATS_LAST_TIME_KEY = "er.extensions.erxStats.lastTime" |
| static final String | STATS_MAX_KEY = "er.extensions.erxStats.max" |
| static final String | STATS_START_TIME_KEY = "er.extensions.erxStats.startTime" |
Adds the specified duration in milliseconds for the given key.
| duration | the duration in milliseconds of the operation | |
| key | the name to log the time under |
| static void addDurationForKey | ( | long | duration, | |
| String | key | |||
| ) | [static] |
Adds the specified duration in milliseconds for the given key.
| duration | the duration in milliseconds of the operation | |
| key | the name to log the time under |
| static NSSet<String> aggregateKeys | ( | ) | [static] |
Returns the aggregate key names for all of the threads that have been recorded.
| static NSArray<LogEntry> aggregateLogEntries | ( | ) | [static] |
Returns an array of LogEntries that represents the aggregate time for all of the tracked stats in the queue, uniqued on key.
Returns a LogEntry that represents the aggregate data collected for the given key in all of the recorded threads.
| key | the key to lookup aggregate stats for |
| static boolean areStatisticsEnabled | ( | ) | [static, private] |
| static void initStatistics | ( | ) | [static] |
| static void initStatisticsIfNecessary | ( | ) | [static] |
Initializes the logging system if the property er.extensions.erxStats.enabled is true. ERXApplication.dispatchRequest will automatically call this.
| static boolean isTrackingStatistics | ( | ) | [static] |
Returns true if the current thread is tracking statistics.
Returns the log entry for the given key.
| key | the key to lookup |
| static void logStatisticsForOperation | ( | Logger | statsLog, | |
| String | operation | |||
| ) | [static] |
Logs the messages since the last call to initStatistics() ordered by some key. Note that no log message is output if there aren't any values
| operation | operation to sort on ("sum", "count", "min", "max", "avg", "key") |
| static void logStatisticsForOperation | ( | String | operation | ) | [static] |
Logs the messages since the last call to initStatistics() ordered by some key.
| operation | operation to sort on ("sum", "count", "min", "max", "avg") |
| static void markEnd | ( | String | key | ) | [static] |
Marks the end of a process, and calls addDuration(..) with the time since markStart.
| key | the key to log under |
Marks the end of a process, and calls addDuration(..) with the time since markStart.
| key | the key to log under |
| static void markStart | ( | String | key | ) | [static] |
Mark the start of a process, call markEnd when it is over to log the duration.
| key | the key log to start logging |
Mark the start of a process, call markEnd when it is over to log the duration.
| key | the key log to start logging |
| static synchronized void reset | ( | ) | [static] |
Resets statistics for this thread AND the global queue.
| static NSMutableDictionary<String, LogEntry> statistics | ( | ) | [static] |
| static boolean traceCollectingEnabled | ( | ) | [static] |
NSMutableArray<NSMutableDictionary<String, LogEntry> > _allStatistics = new NSMutableArray<NSMutableDictionary<String, LogEntry>>() [static, private] |
final Logger log = Logger.getLogger(ERXStats.class) [static] |
final String STATS_ENABLED_KEY = "er.extensions.erxStats.enabled" [static] |
final String STATS_INITIALIZED_KEY = "er.extensions.erxStats.initialized" [static, private] |
final String STATS_LAST_TIME_KEY = "er.extensions.erxStats.lastTime" [static, private] |
final String STATS_MAX_KEY = "er.extensions.erxStats.max" [static, private] |
final String STATS_START_TIME_KEY = "er.extensions.erxStats.startTime" [static, private] |
final String STATS_TRACE_COLLECTING_ENABLED_KEY = "er.extensions.erxStats.traceCollectingEnabled" [static] |
1.5.8