Ipopt 3.11.9
Loading...
Searching...
No Matches
IpTimedTask.hpp
Go to the documentation of this file.
1// Copyright (C) 2006, 2009 International Business Machines and others.
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// $Id: IpTimedTask.hpp 1861 2010-12-21 21:34:47Z andreasw $
6//
7// Authors: Andreas Waechter IBM 2005-09-19
8
9#ifndef __IPTIMEDTASK_HPP__
10#define __IPTIMEDTASK_HPP__
11
12#include "IpUtils.hpp"
13
14namespace Ipopt
15{
19 {
20 public:
25 :
29 start_called_(false),
30 end_called_(true)
31 {}
32
35 {}
37
39 void Reset()
40 {
41 total_cputime_ = 0.;
42 total_systime_ = 0.;
43 total_walltime_ = 0.;
44 start_called_ = false;
45 end_called_ = true;
46 }
47
59
71
87
90 {
92 return total_cputime_;
93 }
94
97 {
99 return total_systime_;
100 }
101
104 {
106 return total_walltime_;
107 }
108
109 private:
119
121 void operator=(const TimedTask&);
123
136
142
143 };
144} // namespace Ipopt
145
146#endif
#define DBG_ASSERT(test)
Definition IpDebug.hpp:38
This class is used to collect timing information for a particular task.
Number start_walltime_
Wall clock time at beginning of task.
void EndIfStarted()
Method that is called after execution of the task for which timing might have been started.
~TimedTask()
Default destructor.
Number total_systime_
Total system time for task measured so far.
Number TotalCpuTime() const
Method returning total CPU time spend for task so far.
Number total_cputime_
Total CPU time for task measured so far.
void End()
Method that is called after execution of the task.
Number start_systime_
System time at beginning of task.
TimedTask(const TimedTask &)
Copy Constructor.
void Reset()
Method for resetting time to zero.
Number TotalSysTime() const
Method returning total system time spend for task so far.
TimedTask()
Default constructor.
void operator=(const TimedTask &)
Overloaded Equals Operator.
Number TotalWallclockTime() const
Method returning total wall clock time spend for task so far.
Number start_cputime_
CPU time at beginning of task.
Number total_walltime_
Total wall clock time for task measured so far.
void Start()
Method that is called before execution of the task.
Number CpuTime()
method determining CPU time
Number WallclockTime()
method determining wallclock time since first call
Number SysTime()
method determining system time
double Number
Type of all numbers.
Definition IpTypes.hpp:17