LCOV - code coverage report
Current view: top level - include/hpactor/tracing - memory_exporter.hpp (source / functions) Coverage Total Hit
Test: HPActor Coverage Lines: 33.3 % 3 1
Test Date: 2026-05-20 02:24:49 Functions: 50.0 % 2 1
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #pragma once
       2                 :             : 
       3                 :             : #include <hpactor/tracing/trace_exporter.hpp>
       4                 :             : 
       5                 :             : #include <mutex>
       6                 :             : #include <vector>
       7                 :             : 
       8                 :             : namespace hpactor::tracing {
       9                 :             : 
      10                 :             : class MemoryExporter final : public SpanExporter {
      11                 :             :   public:
      12                 :             :     result<void> export_batch(std::span<const SpanRecord> batch) noexcept override;
      13                 :           4 :     void shutdown() noexcept override {}
      14                 :           0 :     const char* name() const noexcept override {
      15                 :           0 :         return "memory";
      16                 :             :     }
      17                 :             :     std::vector<SpanRecord> snapshot() const;
      18                 :             :     void clear();
      19                 :             : 
      20                 :             :   private:
      21                 :             :     mutable std::mutex mutex_;
      22                 :             :     std::vector<SpanRecord> spans_;
      23                 :             : };
      24                 :             : 
      25                 :             : } // namespace hpactor::tracing
        

Generated by: LCOV version 2.0-1