Skip to content

Commit

Permalink
Drqs 175400868/teom metric names (#4764)
Browse files Browse the repository at this point in the history
* update metric names to include bde prefix

* update test drivers
  • Loading branch information
Jeffrey Mendelsohn authored and GitHub Enterprise committed May 28, 2024
1 parent 0d0d1a5 commit a28cb6f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion groups/bdl/bdlmt/bdlmt_eventscheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void EventScheduler::initialize(bdlm::MetricsRegistry *metricsRegistry,

bdlm::MetricDescriptor md(
bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION,
"startlag",
"bde.startlag",
instanceNumber,
"bdlmt.eventscheduler",
"es",
Expand Down
4 changes: 2 additions & 2 deletions groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
ASSERT(d_handles.empty());
ASSERT(1 == d_descriptors.size());
ASSERT(d_descriptors[0].metricNamespace() == "");
ASSERT(d_descriptors[0].metricName() == "startlag");
ASSERT(d_descriptors[0].metricName() == "bde.startlag");
ASSERT(d_descriptors[0].objectTypeAbbreviation() == "es");
ASSERT(d_descriptors[0].objectTypeName() ==
"bdlmt.eventscheduler");
Expand All @@ -1101,7 +1101,7 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
return d_handles.empty()
&& 1 == d_descriptors.size()
&& d_descriptors[0].metricNamespace() == ""
&& d_descriptors[0].metricName() == "startlag"
&& d_descriptors[0].metricName() == "bde.startlag"
&& d_descriptors[0].objectTypeAbbreviation() == "es"
&& d_descriptors[0].objectTypeName() == "bdlmt.eventscheduler"
&& d_descriptors[0].instanceNumber() == count
Expand Down
4 changes: 2 additions & 2 deletions groups/bdl/bdlmt/bdlmt_fixedthreadpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ void FixedThreadPool::initialize(bdlm::MetricsRegistry *metricsRegistry,

bdlm::MetricDescriptor mdBacklog(
bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION,
"backlog",
"bde.backlog",
instanceNumber,
"bdlmt.fixedthreadpool",
"ftp",
metricsIdentifier);

bdlm::MetricDescriptor mdUsedCapacity(
bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION,
"usedcapacity",
"bde.usedcapacity",
instanceNumber,
"bdlmt.fixedthreadpool",
"ftp",
Expand Down
14 changes: 6 additions & 8 deletions groups/bdl/bdlmt/bdlmt_fixedthreadpool.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,14 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
ASSERT(d_handles.empty());
ASSERT(2 == d_descriptors.size());
ASSERT(d_descriptors[0].metricNamespace() == "");
ASSERT(d_descriptors[0].metricName() == "backlog");
ASSERT(d_descriptors[0].metricName() == "bde.backlog");
ASSERT(d_descriptors[0].objectTypeAbbreviation() == "ftp");
ASSERT(d_descriptors[0].objectTypeName() ==
"bdlmt.fixedthreadpool");
ASSERT(d_descriptors[0].instanceNumber() == count);
ASSERT(d_descriptors[0].objectIdentifier() == name);
ASSERT(d_descriptors[1].metricNamespace() == "");
ASSERT(d_descriptors[1].metricName() == "usedcapacity");
ASSERT(d_descriptors[1].metricName() == "bde.usedcapacity");
ASSERT(d_descriptors[1].objectTypeAbbreviation() == "ftp");
ASSERT(d_descriptors[1].objectTypeName() ==
"bdlmt.fixedthreadpool");
Expand All @@ -315,17 +315,15 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
return d_handles.empty()
&& 2 == d_descriptors.size()
&& d_descriptors[0].metricNamespace() == ""
&& d_descriptors[0].metricName() == "backlog"
&& d_descriptors[0].metricName() == "bde.backlog"
&& d_descriptors[0].objectTypeAbbreviation() == "ftp"
&& d_descriptors[0].objectTypeName() ==
"bdlmt.fixedthreadpool"
&& d_descriptors[0].objectTypeName() == "bdlmt.fixedthreadpool"
&& d_descriptors[0].instanceNumber() == count
&& d_descriptors[0].objectIdentifier() == name
&& d_descriptors[1].metricNamespace() == ""
&& d_descriptors[1].metricName() == "usedcapacity"
&& d_descriptors[1].metricName() == "bde.usedcapacity"
&& d_descriptors[1].objectTypeAbbreviation() == "ftp"
&& d_descriptors[1].objectTypeName() ==
"bdlmt.fixedthreadpool"
&& d_descriptors[1].objectTypeName() == "bdlmt.fixedthreadpool"
&& d_descriptors[1].instanceNumber() == count
&& d_descriptors[1].objectIdentifier() == name;
}
Expand Down
2 changes: 1 addition & 1 deletion groups/bdl/bdlmt/bdlmt_threadpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void ThreadPool::initialize(bdlm::MetricsRegistry *metricsRegistry,

bdlm::MetricDescriptor md(
bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION,
"backlog",
"bde.backlog",
instanceNumber,
"bdlmt.threadpool",
"tp",
Expand Down
4 changes: 2 additions & 2 deletions groups/bdl/bdlmt/bdlmt_threadpool.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
ASSERT(d_handles.empty());
ASSERT(1 == d_descriptors.size());
ASSERT(d_descriptors[0].metricNamespace() == "");
ASSERT(d_descriptors[0].metricName() == "backlog");
ASSERT(d_descriptors[0].metricName() == "bde.backlog");
ASSERT(d_descriptors[0].objectTypeAbbreviation() == "tp");
ASSERT(d_descriptors[0].objectTypeName() == "bdlmt.threadpool");
ASSERT(d_descriptors[0].instanceNumber() == count);
Expand All @@ -288,7 +288,7 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
return d_handles.empty()
&& 1 == d_descriptors.size()
&& d_descriptors[0].metricNamespace() == ""
&& d_descriptors[0].metricName() == "backlog"
&& d_descriptors[0].metricName() == "bde.backlog"
&& d_descriptors[0].objectTypeAbbreviation() == "tp"
&& d_descriptors[0].objectTypeName() == "bdlmt.threadpool"
&& d_descriptors[0].instanceNumber() == count
Expand Down
2 changes: 1 addition & 1 deletion groups/bdl/bdlmt/bdlmt_timereventscheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ void TimerEventScheduler::initialize(

bdlm::MetricDescriptor md(
bdlm::MetricDescriptor::k_USE_METRICS_ADAPTER_NAMESPACE_SELECTION,
"startlag",
"bde.startlag",
instanceNumber,
"bdlmt.timereventscheduler",
"tes",
Expand Down
4 changes: 2 additions & 2 deletions groups/bdl/bdlmt/bdlmt_timereventscheduler.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
ASSERT(d_handles.empty());
ASSERT(1 == d_descriptors.size());
ASSERT(d_descriptors[0].metricNamespace() == "");
ASSERT(d_descriptors[0].metricName() == "startlag");
ASSERT(d_descriptors[0].metricName() == "bde.startlag");
ASSERT(d_descriptors[0].objectTypeAbbreviation() == "tes");
ASSERT(d_descriptors[0].objectTypeName() ==
"bdlmt.timereventscheduler");
Expand All @@ -862,7 +862,7 @@ bool TestMetricsAdapter::verify(const bsl::string& name) const
return d_handles.empty()
&& 1 == d_descriptors.size()
&& d_descriptors[0].metricNamespace() == ""
&& d_descriptors[0].metricName() == "startlag"
&& d_descriptors[0].metricName() == "bde.startlag"
&& d_descriptors[0].objectTypeAbbreviation() == "tes"
&& d_descriptors[0].objectTypeName() ==
"bdlmt.timereventscheduler"
Expand Down

0 comments on commit a28cb6f

Please sign in to comment.