Classes | Public Member Functions | Private Attributes | List of all members
Statistics Class Reference

Classes

struct  stat
 

Public Member Functions

 Statistics ()
 
void begin (const char *name)
 
void end ()
 
void print ()
 

Private Attributes

QList< statstats
 
QTime time
 

Detailed Description

Definition at line 212 of file doxygen.cpp.

Constructor & Destructor Documentation

Statistics::Statistics ( )
inline

Definition at line 215 of file doxygen.cpp.

215 { stats.setAutoDelete(TRUE); }
QList< stat > stats
Definition: doxygen.cpp:252
const bool TRUE
Definition: qglobal.h:371

Member Function Documentation

void Statistics::begin ( const char *  name)
inline

Definition at line 216 of file doxygen.cpp.

217  {
218  msg(name);
219  stat *entry= new stat(name,0);
220  stats.append(entry);
221  time.restart();
222  }
static QCString name
Definition: declinfo.cpp:673
QList< Entry > entry
void msg(const char *fmt,...)
Definition: message.cpp:107
QList< stat > stats
Definition: doxygen.cpp:252
void Statistics::end ( )
inline

Definition at line 223 of file doxygen.cpp.

224  {
225  stats.getLast()->elapsed=((double)time.elapsed())/1000.0;
226  }
QList< stat > stats
Definition: doxygen.cpp:252
void Statistics::print ( )
inline

Definition at line 227 of file doxygen.cpp.

228  {
229  bool restore=FALSE;
231  {
232  Debug::clearFlag("time");
233  restore=TRUE;
234  }
235  msg("----------------------\n");
237  stat *s;
238  for ( sli.toFirst(); (s=sli.current()); ++sli )
239  {
240  msg("Spent %.3f seconds in %s",s->elapsed,s->name);
241  }
242  if (restore) Debug::setFlag("time");
243  }
void msg(const char *fmt,...)
Definition: message.cpp:107
const bool FALSE
Definition: qglobal.h:370
static int setFlag(const char *label)
Definition: debug.cpp:102
static void clearFlag(const char *label)
Definition: debug.cpp:109
QList< stat > stats
Definition: doxygen.cpp:252
static bool isFlagSet(DebugMask mask)
Definition: debug.cpp:119
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371

Member Data Documentation

QList<stat> Statistics::stats
private

Definition at line 252 of file doxygen.cpp.

QTime Statistics::time
private

Definition at line 253 of file doxygen.cpp.


The documentation for this class was generated from the following file: