MeVisLab Toolbox Reference
mlAccumulatedProfile.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13// The accumulated profile.
14
15#ifndef ML_ACCUMULATED_PROFILE_H
16#define ML_ACCUMULATED_PROFILE_H
17
19#include "mlMemoryProfile.h"
20#include "mlTimeProfile.h"
21
22class MLMetaProfile;
23
24
25//----------------------------------------------------------------------------------
26
28{
29public:
30 MLAccumulatedProfile() { reset(); }
31
33 void reset();
34
37
40
42 MLProfilingMemoryType getTotalMemory() const { return _totalMemory; }
43
45 MLProfilingMemoryType getCurrentlyUsedMemory() const { return _currentMemory; }
46
48 MLProfilingTimeType getConsumedTime() const { return _consumedTime; }
49
52
53private:
54 MLProfilingMemoryType _totalMemory;
55 MLProfilingMemoryType _currentMemory;
56 MLProfilingTimeType _consumedTime;
57};
58
59
60#endif // _ML_ACCUMULATED_PROFILE_H_
void reset()
Resets the accumulated profile.
MLProfilingTimeType getConsumedTime() const
Returns the accumulated consumed time (aka self time).
MLProfilingMemoryType getTotalMemory() const
Returns the total amount of allocated memory.
void feed(const MLMetaProfile &profile)
Accumulates the profiles associated with address of the profiler to this profiles.
MLAccumulatedProfile & operator+=(const MLAccumulatedProfile &other)
This operator does the same as feed(), provided for convenience.
MLProfilingMemoryType getCurrentlyUsedMemory() const
Returns the currently used memory.
void feed(const MLAccumulatedProfile &profile)
Accumulates the profiles of the accumulated profile to this profiles.
double MLProfilingTimeType
Definition mlCallGraph.h:67
size_t MLProfilingMemoryType
#define MLPROFILINGMANAGER_EXPORT
Target mlrange_cast(Source arg)
Generic version of checked ML casts.