SpECTRE Documentation Coverage Report
Current view: top level - Parallel/MemoryMonitor - Tags.hpp Hit Total Coverage
Commit: d0fc80462417e83e5cddfa1b9901bb4a9b6af4d6 Lines: 2 5 40.0 %
Date: 2024-03-29 00:33:31
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : #include <string>
       8             : #include <unordered_map>
       9             : 
      10             : #include "DataStructures/DataBox/Tag.hpp"
      11             : #include "Utilities/PrettyType.hpp"
      12             : 
      13             : namespace mem_monitor {
      14             : /*!
      15             :  * Gives full subfile path to the dat file for the memory monitor of a
      16             :  * parallel component
      17             :  */
      18             : template <typename ParallelComponent>
      19           1 : std::string subfile_name() {
      20             :   return "/MemoryMonitors/" + pretty_type::name<ParallelComponent>();
      21             : }
      22             : 
      23           0 : namespace Tags {
      24             : /*!
      25             :  * \brief Tag to hold memory usage of parallel components before it is written
      26             :  * to disk.
      27             :  *
      28             :  * \details The types in the unordered_map are as follows:
      29             :  *
      30             :  * \code
      31             :  * std::unordered_map<ComponentName, std::unordered_map<%Time,
      32             :  *      std::unordered_map<Node/Proc, Memory in MB>>>
      33             :  * \endcode
      34             :  */
      35           1 : struct MemoryHolder : db::SimpleTag {
      36           0 :   using type = std::unordered_map<
      37             :       std::string, std::unordered_map<double, std::unordered_map<int, double>>>;
      38             : };
      39             : }  // namespace Tags
      40             : }  // namespace mem_monitor

Generated by: LCOV version 1.14