Skip to content

Commit

Permalink
remove duplicate func definition
Browse files Browse the repository at this point in the history
  • Loading branch information
shunjiazhu committed Nov 13, 2024
1 parent 2e8f5cf commit 3f06604
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
13 changes: 4 additions & 9 deletions core/monitor/MetricManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ class WriteMetrics {

class ReadMetrics {
protected:
ReadMetrics() = default;
ReadMetrics() = default;
mutable ReadWriteLock mReadWriteLock;
MetricsRecord* mHead = nullptr;
void Clear();
MetricsRecord* GetHead();

public:
virtual ~ReadMetrics();
virtual ~ReadMetrics();
static ReadMetrics* GetInstance() {
static ReadMetrics* ptr = new ReadMetrics();
return ptr;
Expand All @@ -81,17 +81,12 @@ class ReadMetrics {

void ReadAsFileBuffer(std::string& metricsContent) const;


virtual void ReadAsLogGroup(const std::string& regionFieldName,
const std::string& defaultRegion,
std::unordered_map<std::string, sls_logs::LogGroup>& logGroupMap) const;


// serlesialize metrics to other format
// serialize input metrics to metricsContent
virtual void SerializeMetricsToString(std::vector<std::map<std::string, std::string>>& metricsList,
std::string& metricsContent) const {}

// read metrics to other format
// iterate through the metrics list to serialize into metricsContent
virtual void ReadAsCustomizedProtocol(std::string& metricsContent) const {}

void UpdateMetrics();
Expand Down
3 changes: 2 additions & 1 deletion core/provider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ project(provider)
file(GLOB LIB_SOURCE_FILES *.cpp *.h)

set(PROVIDER_SUB_DIRECTORIES_LIST
monitor monitor/profile_sender config/feedbacker config/provider config/common_provider protobuf/config_server/v1 protobuf/config_server/v2
monitor monitor/profile_sender
config/feedbacker config/provider config/common_provider protobuf/config_server/v1 protobuf/config_server/v2
)

foreach(DIR_NAME IN LISTS PROVIDER_SUB_DIRECTORIES_LIST)
Expand Down
1 change: 1 addition & 0 deletions core/provider/Provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ std::vector<ConfigProvider*> GetRemoteConfigProviders();
void InitRemoteConfigProviders();

// GetReadMetrics returns the ReadMetrics instance.
// It currently can marshal metrics to sls and file format.
ReadMetrics* GetReadMetrics();

// GetProfileSender returns the ProfileSender instance.
Expand Down

0 comments on commit 3f06604

Please sign in to comment.