Singleton object holding on to the process's I/O statistics.
More...
#include <IOStats.h>
Singleton object holding on to the process's I/O statistics.
This singleton class holds the xAOD file access statistics object describing the auxiliary variable access pattern of the current process.
- Author
- Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Definition at line 34 of file IOStats.h.
◆ IOStats() [1/2]
xAOD::IOStats::IOStats |
( |
| ) |
|
|
private |
The constructor of the object is made private.
Definition at line 49 of file IOStats.cxx.
53 m_ptr( []( ReadStats* ){} ),
◆ IOStats() [2/2]
The copy constructor is deleted.
◆ instance()
IOStats & xAOD::IOStats::instance |
( |
| ) |
|
|
static |
Singleton object accessor.
Definition at line 11 of file IOStats.cxx.
◆ merged()
Access the statistics object, merging information from all threads.
This function should only be used during the finalisation of a process, once all the event processing threads have already finished. That's because it's not absolutely thread-safe. If another thread modifies an xAOD::ReadStats object through the stats() function while this function is executing, that can possibly lead to a crash.
In the end the function is not made thread safe, because doing so would require the stats() function to be made slower.
- Returns
- The merged statistics from all executing threads
Definition at line 34 of file IOStats.cxx.
37 std::lock_guard< std::mutex > lock(
m_mutex );
41 for(
const auto & pair :
m_stats ) {
◆ stats()
Access the object belonging to the current thread.
Components collecting information should always use this function. It is safe to be called at any point during the process, from any thread, without any outside protection.
- Returns
- A thread specific xAOD::ReadStat object that can be modified
Definition at line 17 of file IOStats.cxx.
25 std::lock_guard< std::mutex > lock(
m_mutex );
◆ m_mutex
std::mutex xAOD::IOStats::m_mutex |
|
mutableprivate |
Mutex for accessing the read statistics.
Definition at line 78 of file IOStats.h.
◆ m_ptr
AthContainers_detail::thread_specific_ptr< ReadStats > xAOD::IOStats::m_ptr |
|
private |
Thread specific pointer to the ReadStats object of the current thread.
Definition at line 75 of file IOStats.h.
◆ m_stats
Objects describing the file access pattern, per thread.
Definition at line 72 of file IOStats.h.
The documentation for this class was generated from the following files: