• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acstimeProfiler.h

Go to the documentation of this file.
00001 #ifndef ACSTIME_PROFILER_H
00002 #define ACSTIME_PROFILER_H
00003 /*******************************************************************************
00004 * ALMA - Atacama Large Millimiter Array
00005 * (c) Associated Universities Inc., 2003 
00006 *
00007 *This library is free software; you can redistribute it and/or
00008 *modify it under the terms of the GNU Lesser General Public
00009 *License as published by the Free Software Foundation; either
00010 *version 2.1 of the License, or (at your option) any later version.
00011 *
00012 *This library is distributed in the hope that it will be useful,
00013 *but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 *Lesser General Public License for more details.
00016 *
00017 *You should have received a copy of the GNU Lesser General Public
00018 *License along with this library; if not, write to the Free Software
00019 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 *
00021 * "@(#) $Id: acstimeProfiler.h,v 1.6 2007/06/12 08:02:23 nbarriga Exp $"
00022 *
00023 * who       when      what
00024 * --------  --------  ----------------------------------------------
00025 * david  2003-07-04  created
00026 */
00028 #ifndef __cplusplus
00029 #error This is a C++ include file and cannot be used from plain C
00030 #endif
00031 
00032 #include <acsutilTimeStamp.h>
00033 #include <iostream>
00034 #include <string>
00035 #include "acstimeC.h"
00036 #include "acstimeEpochHelper.h"
00038 
00049 class Profiler
00050 {
00051   public:
00053 
00055     Profiler();
00058     virtual ~Profiler(){};
00059     
00067     void reset();
00068 
00076     void start();
00077 
00085     ACS::Time stop();   
00086 
00096     void fullDescription(const char* msg);
00097 
00101     void addData(const char* key, const char* value);
00102     
00103     
00104   private:
00107     ACS::Time lastStart_m;
00108 
00110     ACS::Time totalTime;
00112     unsigned long totalNumStarts_m;
00113 
00115     ACS::Time minDuration;
00117     ACS::Time maxDuration;
00118 
00119     std::string extraDescrip_m;
00120 
00122     EpochHelper *epochHelper_mp;
00123 
00125 
00127     Profiler(const Profiler&);
00128 
00131     void operator= (const Profiler&);
00132 };
00133 
00134 #endif
00135 
00136 
00137 
00138 

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0