ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PerformanceMonitoring
PerfMonTests
src
PerfMonTestCpuCruncherAlg.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// PerfMonTestCpuCruncherAlg.h
8
// Header file for class PerfMonTest::CpuCruncherAlg
9
// Author: S.Binet<binet@cern.ch>, A. S. Mete<amete@cern.ch>
11
#ifndef PERFMONTESTS_PERFMONTESTCPUCRUNCHERALG_H
12
#define PERFMONTESTS_PERFMONTESTCPUCRUNCHERALG_H
13
14
// STL includes
15
#include <string>
16
#include <random>
17
18
// FrameWork includes
19
#include "
AthenaBaseComps/AthAlgorithm.h
"
20
#include "GaudiKernel/ServiceHandle.h"
21
22
namespace
PerfMonTest
{
23
24
class
CpuCruncherAlg
:
public
AthAlgorithm
25
{
26
28
// Public methods:
30
public
:
31
using
AthAlgorithm::AthAlgorithm
;
32
33
// Athena algorithm's Hooks
34
virtual
StatusCode
initialize
()
override
;
35
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
36
37
// Perform math operations to burn CPU for a number of iterations
38
double
burn
(
unsigned
long
nIterations);
39
41
// Private data:
43
private
:
44
46
Gaudi::Property<float>
m_meanCpuTime
{
this
,
"MeanCpu"
, 100.,
"Mean (in ms) of CPU time to consume."
};
47
49
Gaudi::Property<float>
m_rmsCpuTime
{
this
,
"RmsCpu"
, 5.,
"RMS (in ms) of CPU time to consume."
};
50
52
std::default_random_engine
m_random
;
53
std::normal_distribution<double>
m_distribution
;
54
55
};
56
57
}
//> end namespace PerfMonTest
58
59
#endif
//> PERFMONTESTS_PERFMONTESTCPUCRUNCHERALG_H
AthAlgorithm.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
PerfMonTest::CpuCruncherAlg
Definition
PerfMonTestCpuCruncherAlg.h:25
PerfMonTest::CpuCruncherAlg::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
PerfMonTestCpuCruncherAlg.cxx:40
PerfMonTest::CpuCruncherAlg::m_rmsCpuTime
Gaudi::Property< float > m_rmsCpuTime
Property to setup the RMS (in ms) of CPU time to consume.
Definition
PerfMonTestCpuCruncherAlg.h:49
PerfMonTest::CpuCruncherAlg::burn
double burn(unsigned long nIterations)
Definition
PerfMonTestCpuCruncherAlg.cxx:65
PerfMonTest::CpuCruncherAlg::m_random
std::default_random_engine m_random
Random number setup.
Definition
PerfMonTestCpuCruncherAlg.h:52
PerfMonTest::CpuCruncherAlg::m_distribution
std::normal_distribution< double > m_distribution
Definition
PerfMonTestCpuCruncherAlg.h:53
PerfMonTest::CpuCruncherAlg::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
PerfMonTest::CpuCruncherAlg::m_meanCpuTime
Gaudi::Property< float > m_meanCpuTime
Property to setup the mean (in ms) of CPU time to consume.
Definition
PerfMonTestCpuCruncherAlg.h:46
PerfMonTest::CpuCruncherAlg::initialize
virtual StatusCode initialize() override
Definition
PerfMonTestCpuCruncherAlg.cxx:24
PerfMonTest
PerfMonTestPolyVectorAlg.h Example for the memory optimization tutorial.
Definition
Control/PerformanceMonitoring/PerfMonTests/src/Hit.h:7
Generated on
for ATLAS Offline Software by
1.17.0