@@ -146,51 +146,26 @@ class MODEL_EXPORT CDataGatherer {
146
146
// ! \param[in] summaryMode Indicates whether the data being gathered
147
147
// ! are already summarized by an external aggregation process.
148
148
// ! \param[in] modelParams The global configuration parameters.
149
- // ! \param[in] summaryCountFieldName If \p summaryMode is E_Manual
150
- // ! then this is the name of the field holding the summary count.
151
149
// ! \param[in] partitionFieldValue The value of the field which splits
152
150
// ! the data.
153
- // ! \param[in] personFieldName The name of the field which identifies
154
- // ! people.
155
- // ! \param[in] attributeFieldName The name of the field which defines
156
- // ! the person attributes.
157
- // ! \param[in] valueFieldName The name of the field which contains
158
- // ! the metric values.
159
- // ! \param[in] influenceFieldNames The field names for which we will
160
- // ! compute influences.
161
151
// ! \param[in] key The key of the search for which to gatherer data.
162
152
// ! \param[in] features The features of the data to model.
163
- // ! \param[in] startTime The start of the time interval for which
164
- // ! to gather data.
165
- // ! \param[in] sampleCountOverride for the number of measurements
166
- // ! in a statistic. (Note that this is intended for testing only.)
167
- // ! A zero value means that the data gatherer class will determine
168
- // ! an appropriate value for the bucket length and data rate.
153
+ // ! \param[in] bucketGathererInitData The parameter initialization object for the bucket gatherer.
169
154
CDataGatherer (model_t ::EAnalysisCategory gathererType,
170
155
model_t ::ESummaryMode summaryMode,
171
156
const SModelParams& modelParams,
172
- const std::string& summaryCountFieldName,
173
- const std::string& partitionFieldValue,
174
- const std::string& personFieldName,
175
- const std::string& attributeFieldName,
176
- const std::string& valueFieldName,
177
- const TStrVec& influenceFieldNames,
157
+ std::string partitionFieldValue,
178
158
const CSearchKey& key,
179
159
const TFeatureVec& features,
180
- core_t ::TTime startTime,
181
- int sampleCountOverride);
160
+ const CBucketGatherer::SBucketGathererInitData& bucketGathererInitData);
182
161
183
162
// ! Construct from a state document.
184
163
CDataGatherer (model_t ::EAnalysisCategory gathererType,
185
164
model_t ::ESummaryMode summaryMode,
186
165
const SModelParams& modelParams,
187
- const std::string& summaryCountFieldName,
188
- const std::string& partitionFieldValue,
189
- const std::string& personFieldName,
190
- const std::string& attributeFieldName,
191
- const std::string& valueFieldName,
192
- const TStrVec& influenceFieldNames,
166
+ std::string partitionFieldValue,
193
167
const CSearchKey& key,
168
+ const CBucketGatherer::SBucketGathererInitData& bucketGathererInitData,
194
169
core::CStateRestoreTraverser& traverser);
195
170
196
171
// ! Create a copy that will result in the same persisted state as the
@@ -330,6 +305,7 @@ class MODEL_EXPORT CDataGatherer {
330
305
// ! containing \p time.
331
306
// !
332
307
// ! \param[in] time The time of interest.
308
+ // ! \param[in] bucketLength The length of the bucketing interval.
333
309
// ! \param[out] result Filled in with the feature data at \p time.
334
310
// ! \tparam T The type of the feature data.
335
311
template <typename T>
@@ -648,9 +624,9 @@ class MODEL_EXPORT CDataGatherer {
648
624
649
625
// ! Helper to avoid code duplication when getting a count from a
650
626
// ! field. Logs different errors for missing value and invalid value.
651
- bool extractCountFromField (const std::string& fieldName,
652
- const std::string* fieldValue,
653
- std::size_t & count) const ;
627
+ static bool extractCountFromField (const std::string& fieldName,
628
+ const std::string* fieldValue,
629
+ std::size_t & count);
654
630
655
631
// ! Helper to avoid code duplication when getting a metric value from a
656
632
// ! field. Logs different errors for missing value and invalid value.
@@ -675,19 +651,11 @@ class MODEL_EXPORT CDataGatherer {
675
651
676
652
private:
677
653
// ! Restore state from supplied traverser.
678
- bool acceptRestoreTraverser (const std::string& summaryCountFieldName,
679
- const std::string& personFieldName,
680
- const std::string& attributeFieldName,
681
- const std::string& valueFieldName,
682
- const TStrVec& influenceFieldNames,
654
+ bool acceptRestoreTraverser (const CBucketGatherer::SBucketGathererInitData& bucketGathererInitData,
683
655
core::CStateRestoreTraverser& traverser);
684
656
685
657
// ! Restore a bucket gatherer from the supplied traverser.
686
- bool restoreBucketGatherer (const std::string& summaryCountFieldName,
687
- const std::string& personFieldName,
688
- const std::string& attributeFieldName,
689
- const std::string& valueFieldName,
690
- const TStrVec& influenceFieldNames,
658
+ bool restoreBucketGatherer (const CBucketGatherer::SBucketGathererInitData& bucketGathererInitData,
691
659
core::CStateRestoreTraverser& traverser);
692
660
693
661
// ! Persist a bucket gatherer by passing information to the supplied
@@ -696,13 +664,7 @@ class MODEL_EXPORT CDataGatherer {
696
664
697
665
// ! Create the bucket specific data gatherer.
698
666
void createBucketGatherer (model_t ::EAnalysisCategory gathererType,
699
- const std::string& summaryCountFieldName,
700
- const std::string& personFieldName,
701
- const std::string& attributeFieldName,
702
- const std::string& valueFieldName,
703
- const TStrVec& influenceFieldNames,
704
- core_t ::TTime startTime,
705
- unsigned int sampleCountOverride);
667
+ const CBucketGatherer::SBucketGathererInitData& initData);
706
668
707
669
private:
708
670
// ! The type of the bucket gatherer(s) used.
0 commit comments