6 #ifndef TRACER_HPP_INCLUDE
7 #define TRACER_HPP_INCLUDE
17 #include "geopm/PlatformIO.hpp"
30 virtual void columns(
const std::vector<std::string> &agent_cols,
31 const std::vector<std::function<std::string(
double)> > &agent_formats) = 0;
39 virtual void update(
const std::vector<double> &agent_signals) = 0;
56 const std::string &file_path,
57 const std::string &hostname,
59 PlatformIO &platform_io,
60 const PlatformTopo &platform_topo,
61 const std::vector<std::pair<std::string, int> > &env_column);
64 void columns(
const std::vector<std::string> &agent_cols,
65 const std::vector<std::function<std::string(
double)> > &agent_formats)
override;
66 void update(
const std::vector<double> &agent_signals)
override;
67 void flush(
void)
override;
73 std::function<std::string(
double)> format;
76 std::vector<std::string> env_signals(
void);
77 std::vector<int> env_domains(
void);
78 std::vector<std::function<std::string(
double)> > env_formats(
void);
80 std::string m_file_path;
82 std::string m_hostname;
83 bool m_is_trace_enabled;
85 PlatformIO &m_platform_io;
86 const PlatformTopo &m_platform_topo;
87 std::vector<std::pair<std::string, int> > m_env_column;
88 std::vector<int> m_column_idx;
89 std::vector<double> m_last_telemetry;
90 const size_t M_BUFFER_SIZE;
91 std::unique_ptr<CSV> m_csv;
92 int m_region_hash_idx;
93 int m_region_hint_idx;
94 int m_region_progress_idx;
95 int m_region_runtime_idx;
CSV class provides the GEOPM interface for creation of character separated value tabular data files....
Definition: CSV.hpp:25
Abstract base class for the Tracer object defines the interface.
Definition: Tracer.hpp:24
virtual ~Tracer()=default
virtual void update(const std::vector< double > &agent_signals)=0
Update the trace with telemetry samples and region info. The Tracer samples values for default and en...
virtual void flush(void)=0
Write the remaining trace data to the file and stop tracing.
virtual void columns(const std::vector< std::string > &agent_cols, const std::vector< std::function< std::string(double)> > &agent_formats)=0
Set up default columns and add columns to be.
Class used to write a trace of the telemetry and policy.
Definition: Tracer.hpp:51
void columns(const std::vector< std::string > &agent_cols, const std::vector< std::function< std::string(double)> > &agent_formats) override
Set up default columns and add columns to be.
Definition: Tracer.cpp:60
TracerImp(const std::string &start_time)
TracerImp constructor.
Definition: Tracer.cpp:30
virtual ~TracerImp()=default
TracerImp destructor, virtual.
void update(const std::vector< double > &agent_signals) override
Update the trace with telemetry samples and region info. The Tracer samples values for default and en...
Definition: Tracer.cpp:144
void flush(void) override
Write the remaining trace data to the file and stop tracing.
Definition: Tracer.cpp:170
Definition: Accumulator.cpp:12