MCPcopy Create free account
hub / github.com/apache/impala / TestToString_stringstream

Method TestToString_stringstream

be/src/benchmarks/date-benchmark.cc:192–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190 }
191
192 void TestToString_stringstream(int batch_size) {
193 for (int i = 0; i < batch_size; ++i) {
194 int n = date_.size();
195 for (int j = 0; j < n; ++j) {
196 // Old implementation before IMPALA-12111.
197 stringstream ss;
198 int year, month, day;
199 if (date_[j].ToYearMonthDay(&year, &month, &day)) {
200 ss << std::setfill('0') << setw(4) << year << "-" << setw(2) << month << "-"
201 << setw(2) << day;
202 }
203 to_string_old_result_[j] = ss.str();
204 }
205 }
206 }
207
208 bool CheckResults() {
209 DCHECK(to_ymd_result_.size() == cctz_to_ymd_result_.size());

Callers 1

Calls 3

ToYearMonthDayMethod · 0.80
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected