LCOV - code coverage report
Current view: top level - src/Module/Stateful/Probe - Probe.cpp (source / functions) Hit Total Coverage
Test: streampu_clean.info Lines: 13 17 76.5 %
Date: 2025-01-11 12:25:42 Functions: 4 4 100.0 %

          Line data    Source code
       1             : #include "Module/Stateful/Probe/Probe.hpp"
       2             : 
       3             : using namespace spu;
       4             : using namespace spu::module;
       5             : 
       6         182 : AProbe::AProbe()
       7             :   : Stateful()
       8         182 :   , reporter(nullptr)
       9             : {
      10         182 : }
      11             : 
      12             : void
      13        1827 : AProbe::check_reporter()
      14             : {
      15        1827 :     if (reporter == nullptr)
      16             :     {
      17           0 :         std::stringstream message;
      18           0 :         message << "'reporter' can't be null, it is required to call 'AProbe::register_reporter()' first.";
      19           0 :         throw tools::runtime_error(__FILE__, __LINE__, __func__, message.str());
      20           0 :     }
      21        1827 : }
      22             : 
      23             : void
      24         182 : AProbe::proxy_register_probe(const size_t data_size,
      25             :                              const std::type_index data_type,
      26             :                              const std::string& unit,
      27             :                              const size_t buffer_size,
      28             :                              const std::ios_base::fmtflags ff,
      29             :                              const size_t precision)
      30             : {
      31         182 :     this->reporter->register_probe(*this, data_size, data_type, unit, buffer_size, ff, precision);
      32         182 : }
      33             : 
      34             : void
      35        1729 : AProbe::proxy_probe(const void* data, const size_t frame_id)
      36             : {
      37        1729 :     this->check_reporter();
      38        1729 :     this->reporter->probe(*this, data, frame_id);
      39        1729 : }

Generated by: LCOV version 1.14