ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkGlobalResourceProbe.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef rtkGlobalResourceProbe_h
19#define rtkGlobalResourceProbe_h
20
21#include "RTKExport.h"
24#include <itkProcessObject.h>
25#include <mutex>
26
27namespace rtk
28{
35
36class RTK_EXPORT GlobalResourceProbe : public itk::Object
37{
38public:
39 ITK_DISALLOW_COPY_AND_MOVE(GlobalResourceProbe);
40
46
48 itkOverrideGetNameOfClassMacro(GlobalResourceProbe);
49
55 static Pointer
56 New();
57
59 static Pointer
61
63 itkSetMacro(Verbose, bool);
64 itkGetMacro(Verbose, bool);
65
68 virtual void
69 Start(const char * id);
70
72 virtual void
73 Stop(const char * id);
74
76 virtual void
77 Report(std::ostream & os = std::cout) const;
78
81 virtual void
83
85 virtual void
87
89 virtual void
91
92protected:
95 void
96 PrintSelf(std::ostream & os, Indent indent) const override;
98
100 std::vector<rtk::WatcherForResourceProbe *> m_Watchers;
101
102private:
104 std::mutex m_Mutex;
105};
106} // namespace rtk
107
108#endif
Control indentation during Print() invocation.
Definition itkIndent.h:53
Base class for most ITK classes.
Definition itkObject.h:62
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Implements transparent reference counting.
virtual void Watch(itk::ProcessObject *o)
static Pointer GetInstance()
static Pointer New()
~GlobalResourceProbe() override
itk::SmartPointer< const Self > ConstPointer
virtual void Report(std::ostream &os=std::cout) const
virtual void Stop(const char *id)
std::vector< rtk::WatcherForResourceProbe * > m_Watchers
virtual void Start(const char *id)
virtual void Remove(const rtk::WatcherForResourceProbe *w)
void PrintSelf(std::ostream &os, Indent indent) const override
ResourceProbesCollector m_ResourceProbesCollector
itk::SmartPointer< Self > Pointer
Aggregates a set of time, memory and cuda memory probes.
Very light watcher to monitor Start and End events on all filters.
#define itkSetMacro(name, type)