A class to manage real algorithm timing
Definition at line 44 of file precedence.py.
◆ __init__()
| def GaudiHive.precedence.RealTimeValue.__init__ |
( |
|
self, |
|
|
|
path, |
|
|
|
defaultTime, |
|
|
|
factor = 1 |
|
) |
| |
defaultTime -- run time, assigned to an algorithm if no time is found in provided timing library
(and it will also be scaled by the 'factor' argument)
Definition at line 47 of file precedence.py.
47 def __init__(self, path, defaultTime, factor=1):
49 defaultTime -- run time, assigned to an algorithm if no time is found in provided timing library 50 (and it will also be scaled by the 'factor' argument) 55 self.defaultTime = defaultTime
58 self.file = open(self.path)
59 self.timings = json.load(self.file)
def _buildFilePath(filePath)
◆ get()
| def GaudiHive.precedence.RealTimeValue.get |
( |
|
self, |
|
|
|
algoName = '' |
|
) |
| |
Get time for a given algorithm name
Definition at line 61 of file precedence.py.
61 def get(self, algoName=''):
62 """Get time for a given algorithm name""" 64 if algoName
in self.timings:
65 time = float(self.timings[algoName])
67 capAlgoName = algoName[0].upper() + algoName[1:len(algoName)]
69 if capAlgoName
in self.timings:
70 time = float(self.timings[capAlgoName])
72 time = self.defaultTime
74 "WARNING: TimiNg for %s (or %s) not found in the provided library, using default one: %s" 75 % (algoName, capAlgoName, time))
77 time = time * self.factor
79 return time, self.varRuntime
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
◆ defaultTime
| GaudiHive.precedence.RealTimeValue.defaultTime |
◆ factor
| GaudiHive.precedence.RealTimeValue.factor |
◆ file
| GaudiHive.precedence.RealTimeValue.file |
◆ path
| GaudiHive.precedence.RealTimeValue.path |
◆ timings
| GaudiHive.precedence.RealTimeValue.timings |
◆ varRuntime
| GaudiHive.precedence.RealTimeValue.varRuntime |
The documentation for this class was generated from the following file: