statistics.hh (10422:148b96b7bc77) statistics.hh (10453:d0365cc3d05f)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 3195 unchanged lines hidden (view full) ---

3204
3205/** Dump all statistics data to the registered outputs */
3206void dump();
3207void reset();
3208void enable();
3209bool enabled();
3210
3211/**
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 3195 unchanged lines hidden (view full) ---

3204
3205/** Dump all statistics data to the registered outputs */
3206void dump();
3207void reset();
3208void enable();
3209bool enabled();
3210
3211/**
3212 * Register reset and dump handlers. These are the functions which
3213 * will actually perform the whole statistics reset/dump actions
3214 * including processing the reset/dump callbacks
3215 */
3216typedef void (*Handler)();
3217
3218void registerHandlers(Handler reset_handler, Handler dump_handler);
3219
3220/**
3212 * Register a callback that should be called whenever statistics are
3213 * reset
3214 */
3215void registerResetCallback(Callback *cb);
3216
3217/**
3218 * Register a callback that should be called whenever statistics are
3219 * about to be dumped
3220 */
3221void registerDumpCallback(Callback *cb);
3222
3221 * Register a callback that should be called whenever statistics are
3222 * reset
3223 */
3224void registerResetCallback(Callback *cb);
3225
3226/**
3227 * Register a callback that should be called whenever statistics are
3228 * about to be dumped
3229 */
3230void registerDumpCallback(Callback *cb);
3231
3232/**
3233 * Process all the callbacks in the reset callbacks queue
3234 */
3235void processResetQueue();
3236
3237/**
3238 * Process all the callbacks in the dump callbacks queue
3239 */
3240void processDumpQueue();
3241
3223std::list<Info *> &statsList();
3224
3225typedef std::map<const void *, Info *> MapType;
3226MapType &statsMap();
3227
3228typedef std::map<std::string, Info *> NameMapType;
3229NameMapType &nameMap();
3230
3231bool validateStatName(const std::string &name);
3232
3233} // namespace Stats
3234
3235void debugDumpStats();
3236
3237#endif // __BASE_STATISTICS_HH__
3242std::list<Info *> &statsList();
3243
3244typedef std::map<const void *, Info *> MapType;
3245MapType &statsMap();
3246
3247typedef std::map<std::string, Info *> NameMapType;
3248NameMapType &nameMap();
3249
3250bool validateStatName(const std::string &name);
3251
3252} // namespace Stats
3253
3254void debugDumpStats();
3255
3256#endif // __BASE_STATISTICS_HH__