@@ -63,60 +63,7 @@ namespace {
63
63
const CSearchKey key;
64
64
const std::string EMPTY_STRING;
65
65
66
- class CDataGathererBuilder {
67
- public:
68
- CDataGathererBuilder (const TFeatureVec& features, const SModelParams& params, const CSearchKey& searchKey,
69
- const core_t ::TTime startTime
70
- ): m_Features(features), m_Params(params), m_StartTime(startTime), m_SearchKey(searchKey) {}
71
-
72
- CDataGatherer build () const {
73
- return {m_GathererType, m_SummaryMode, m_Params, m_SummaryCountFieldName,
74
- m_PartitionFieldValue, m_PersonFieldName, m_AttributeFieldName,
75
- m_ValueFieldName, m_InfluenceFieldNames, m_SearchKey, m_Features,
76
- m_StartTime, m_SampleCountOverride};
77
- }
78
-
79
- CDataGathererBuilder& personFieldName (const std::string& personFieldName) {
80
- m_PersonFieldName = personFieldName;
81
- return *this ;
82
- }
83
-
84
- CDataGathererBuilder& valueFieldName (const std::string& valueFieldName) {
85
- m_ValueFieldName = valueFieldName;
86
- return *this ;
87
- }
88
-
89
- CDataGathererBuilder& influenceFieldNames (const TStrVec& influenceFieldName) {
90
- m_InfluenceFieldNames = influenceFieldName;
91
- return *this ;
92
- }
93
66
94
- CDataGathererBuilder& attributeFieldName (const std::string& attributeFieldName) {
95
- m_AttributeFieldName = attributeFieldName;
96
- return *this ;
97
- }
98
-
99
- CDataGathererBuilder& gathererType (model_t ::EAnalysisCategory gathererType) {
100
- m_GathererType = gathererType;
101
- return *this ;
102
- }
103
-
104
- private:
105
- const TFeatureVec& m_Features;
106
- const SModelParams& m_Params;
107
- core_t ::TTime m_StartTime;
108
- const CSearchKey& m_SearchKey;
109
- model_t ::EAnalysisCategory m_GathererType{model_t ::E_EventRate};
110
- model_t ::ESummaryMode m_SummaryMode{model_t ::E_None};
111
- std::string m_SummaryCountFieldName{EMPTY_STRING};
112
- std::string m_PartitionFieldValue{EMPTY_STRING};
113
- std::string m_PersonFieldName{EMPTY_STRING};
114
- std::string m_AttributeFieldName{EMPTY_STRING};
115
- std::string m_ValueFieldName{EMPTY_STRING};
116
- TStrVec m_InfluenceFieldNames;
117
- int m_SampleCountOverride{0 };
118
-
119
- };
120
67
121
68
std::size_t addPerson (CDataGatherer& gatherer,
122
69
CResourceMonitor& resourceMonitor,
@@ -221,7 +168,7 @@ void testInfluencerPerFeature(const model_t::EFeature feature,
221
168
features.push_back (feature);
222
169
TStrVec influencerFieldNames;
223
170
influencerFieldNames.emplace_back (" IF1" );
224
- CDataGatherer gatherer = CDataGathererBuilder (features, params, key, startTime)
171
+ CDataGatherer gatherer = CDataGathererBuilder (model_t ::E_EventRate, features, params, key, startTime)
225
172
.influenceFieldNames (influencerFieldNames)
226
173
.valueFieldName (valueField)
227
174
.build ();
0 commit comments