MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / get_stat

Function get_stat

test/src/test-cppapi-aggregates.cc:1157–1170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1155}
1156
1157uint64_t get_stat(std::string name, std::string& stats) {
1158 // Parse num_tiles_read from the stats.
1159 std::string to_find = "\"Context.Query.Reader." + name + "\": ";
1160 auto start_pos = stats.find(to_find);
1161
1162 if (start_pos != std::string::npos) {
1163 start_pos += to_find.length();
1164 auto end_pos = stats.find("\n", start_pos);
1165 auto str = stats.substr(start_pos, end_pos - start_pos);
1166 return std::stoull(str);
1167 }
1168
1169 return 0;
1170}
1171
1172template <class T>
1173void CppAggregatesFx<T>::validate_tiles_read(Query& query, bool is_count) {

Calls

no outgoing calls

Tested by

no test coverage detected