Skip to content

Commit 94f2efe

Browse files
committed
fix merge errors
1 parent c3e9089 commit 94f2efe

6 files changed

+26
-20
lines changed

include/model/CBucketGatherer.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ class MODEL_EXPORT CBucketGatherer {
168168
//! to gather data.
169169
//! \param[in] numberInfluencers The number of result influencers
170170
//! for which to gather data.
171-
CBucketGatherer(CDataGatherer& dataGatherer, const SBucketGathererInitData& bucketGathererInitData);
171+
CBucketGatherer(CDataGatherer& dataGatherer,
172+
const SBucketGathererInitData& bucketGathererInitData);
172173

173174
//! Create a copy that will result in the same persisted state as the
174175
//! original. This is effectively a copy constructor that creates a

lib/model/CBucketGatherer.cc

+9-5
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ const std::string CBucketGatherer::METRIC_BUCKET_GATHERER_TAG("b");
204204

205205
CBucketGatherer::CBucketGatherer(CDataGatherer& dataGatherer,
206206
const SBucketGathererInitData& initData)
207-
: m_DataGatherer(dataGatherer), m_EarliestTime(initData.s_StartTime), m_BucketStart(initData.s_StartTime),
207+
: m_DataGatherer(dataGatherer), m_EarliestTime(initData.s_StartTime),
208+
m_BucketStart(initData.s_StartTime),
208209
m_PersonAttributeCounts(dataGatherer.params().s_LatencyBuckets,
209210
dataGatherer.params().s_BucketLength,
210211
initData.s_StartTime,
@@ -216,16 +217,18 @@ CBucketGatherer::CBucketGatherer(CDataGatherer& dataGatherer,
216217
m_InfluencerCounts(dataGatherer.params().s_LatencyBuckets + 3,
217218
dataGatherer.params().s_BucketLength,
218219
initData.s_StartTime,
219-
TSizeSizePrOptionalStrPrUInt64UMapVec(initData.s_InfluenceFieldNames.size())),
220-
m_ResourceMonitor(initData.s_ResourceMonitor){
220+
TSizeSizePrOptionalStrPrUInt64UMapVec(
221+
initData.s_InfluenceFieldNames.size())),
222+
m_ResourceMonitor(initData.s_ResourceMonitor) {
221223
}
222224

223225
CBucketGatherer::CBucketGatherer(bool isForPersistence, const CBucketGatherer& other)
224226
: m_DataGatherer(other.m_DataGatherer),
225227
m_EarliestTime(other.m_EarliestTime), m_BucketStart(other.m_BucketStart),
226228
m_PersonAttributeCounts(other.m_PersonAttributeCounts),
227229
m_PersonAttributeExplicitNulls(other.m_PersonAttributeExplicitNulls),
228-
m_InfluencerCounts(other.m_InfluencerCounts), m_ResourceMonitor(other.m_ResourceMonitor) {
230+
m_InfluencerCounts(other.m_InfluencerCounts),
231+
m_ResourceMonitor(other.m_ResourceMonitor) {
229232
if (!isForPersistence) {
230233
LOG_ABORT(<< "This constructor only creates clones for persistence");
231234
}
@@ -294,7 +297,8 @@ bool CBucketGatherer::addEventData(CEventData& data) {
294297
if (influence) {
295298
const std::string& inf = *influence;
296299
canonicalInfluences[i] = inf;
297-
if (count > 0 && m_ResourceMonitor && m_ResourceMonitor->get().areAllocationsAllowed()) {
300+
if (count > 0 && m_ResourceMonitor &&
301+
m_ResourceMonitor->get().areAllocationsAllowed()) {
298302
influencerCounts[i]
299303
.emplace(boost::unordered::piecewise_construct,
300304
boost::make_tuple(pidCid, inf),

lib/model/CEventRateBucketGatherer.cc

+4-5
Original file line numberDiff line numberDiff line change
@@ -728,18 +728,17 @@ void registerMemoryCallbacks() {
728728

729729
CEventRateBucketGatherer::CEventRateBucketGatherer(CDataGatherer& dataGatherer,
730730
const CBucketGatherer::SBucketGathererInitData& initData)
731-
: CBucketGatherer(dataGatherer,
732-
initData),
733-
m_BeginInfluencingFields(0), m_BeginValueField(0), m_BeginSummaryFields(0) {
731+
: CBucketGatherer(dataGatherer, initData), m_BeginInfluencingFields(0),
732+
m_BeginValueField(0), m_BeginSummaryFields(0) {
734733
this->initializeFieldNames(initData);
735734
this->initializeFeatureData();
736735
}
737736

738737
CEventRateBucketGatherer::CEventRateBucketGatherer(CDataGatherer& dataGatherer,
739738
const CBucketGatherer::SBucketGathererInitData& initData,
740739
core::CStateRestoreTraverser& traverser)
741-
: CBucketGatherer(dataGatherer, initData),
742-
m_BeginInfluencingFields(0), m_BeginValueField(0), m_BeginSummaryFields(0) {
740+
: CBucketGatherer(dataGatherer, initData), m_BeginInfluencingFields(0),
741+
m_BeginValueField(0), m_BeginSummaryFields(0) {
743742
this->initializeFieldNames(initData);
744743
if (traverser.traverseSubLevel(std::bind(&CEventRateBucketGatherer::acceptRestoreTraverser,
745744
this, std::placeholders::_1)) == false) {

lib/model/CMetricBucketGatherer.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,7 @@ struct SReleaseMemory {
926926

927927
CMetricBucketGatherer::CMetricBucketGatherer(CDataGatherer& dataGatherer,
928928
const CBucketGatherer::SBucketGathererInitData& initData)
929-
: CBucketGatherer(dataGatherer,
930-
initData),
929+
: CBucketGatherer(dataGatherer, initData),
931930
m_ValueFieldName(initData.s_ValueFieldName), m_BeginInfluencingFields(0),
932931
m_BeginValueFields(0) {
933932
this->initializeFieldNamesPart1(initData);

lib/model/unittest/CEventRateDataGathererTest.cc

+9-6
Original file line numberDiff line numberDiff line change
@@ -1488,8 +1488,9 @@ class CDistinctStringsTestFixture : public CTestFixture {
14881488

14891489
SEventRateFeatureData featureData(0);
14901490
data.populateDistinctCountFeatureData(featureData);
1491-
std::sort(featureData.s_InfluenceValues[0].begin(), featureData.s_InfluenceValues[0].end(),
1492-
maths::common::COrderings::SFirstLess());
1491+
std::sort(featureData.s_InfluenceValues[0].begin(),
1492+
featureData.s_InfluenceValues[0].end(),
1493+
maths::common::COrderings::SFirstLess());
14931494
BOOST_REQUIRE_EQUAL(std::string("3, [[(inf1, ([2], 1)), (inf2, ([2], 1)), (inf3, ([1], 1))]]"),
14941495
featureData.print());
14951496
}
@@ -1522,8 +1523,9 @@ class CDistinctStringsTestFixture : public CTestFixture {
15221523
SEventRateFeatureData featureData(0);
15231524
data.populateDistinctCountFeatureData(featureData);
15241525
for (std::size_t i = 0; i < 2; i++) {
1525-
std::sort(featureData.s_InfluenceValues[i].begin(), featureData.s_InfluenceValues[i].end(),
1526-
maths::common::COrderings::SFirstLess());
1526+
std::sort(featureData.s_InfluenceValues[i].begin(),
1527+
featureData.s_InfluenceValues[i].end(),
1528+
maths::common::COrderings::SFirstLess());
15271529
}
15281530
BOOST_REQUIRE_EQUAL(std::string("3, [[(inf1, ([2], 1)), (inf2, ([2], 1))], [(inf_v2, ([1], 1)), (inf_v3, ([2], 1))]]"),
15291531
featureData.print());
@@ -1618,8 +1620,9 @@ class CDistinctStringsTestFixture : public CTestFixture {
16181620
SEventRateFeatureData featureData(0);
16191621
data.populateInfoContentFeatureData(featureData);
16201622
for (std::size_t i = 0; i < 2; i++) {
1621-
std::sort(featureData.s_InfluenceValues[i].begin(), featureData.s_InfluenceValues[i].end(),
1622-
maths::common::COrderings::SFirstLess());
1623+
std::sort(featureData.s_InfluenceValues[i].begin(),
1624+
featureData.s_InfluenceValues[i].end(),
1625+
maths::common::COrderings::SFirstLess());
16231626
}
16241627
BOOST_REQUIRE_EQUAL(std::string("18, [[(inf1, ([16], 1)), (inf2, ([16], 1))], [(inf_v2, ([12], 1)), (inf_v3, ([16], 1))]]"),
16251628
featureData.print());

lib/model/unittest/CMetricDataGathererTest.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ BOOST_FIXTURE_TEST_CASE(testMultivariate, CTestFixture) {
16081608
TFeatureVec features;
16091609
features.push_back(model_t::E_IndividualMeanLatLongByPerson);
16101610
CDataGatherer gatherer = CDataGathererBuilder(model_t::E_Metric, features,
1611-
params, KEY, startTime)
1611+
params, KEY, startTime)
16121612
.build();
16131613
BOOST_REQUIRE_EQUAL(0, addPerson("p", gatherer, m_ResourceMonitor));
16141614

0 commit comments

Comments
 (0)