| 466 | } |
| 467 | |
| 468 | void execute(EntryPtrs & connection_entries, Query & query, size_t connection_index) |
| 469 | { |
| 470 | Stopwatch watch; |
| 471 | |
| 472 | Connection & connection = **connection_entries[connection_index]; |
| 473 | |
| 474 | if (reconnect) |
| 475 | connection.disconnect(); |
| 476 | |
| 477 | RemoteBlockInputStream stream( |
| 478 | connection, query, {}, global_context, nullptr, Scalars(), Tables(), query_processing_stage); |
| 479 | if (!query_id.empty()) |
| 480 | stream.setQueryId(query_id); |
| 481 | |
| 482 | Progress progress; |
| 483 | stream.setProgressCallback([&progress](const Progress & value) { progress.incrementPiecewiseAtomically(value); }); |
| 484 | |
| 485 | stream.readPrefix(); |
| 486 | while (Block block = stream.read()); |
| 487 | |
| 488 | stream.readSuffix(); |
| 489 | |
| 490 | const BlockStreamProfileInfo & info = stream.getProfileInfo(); |
| 491 | |
| 492 | double seconds = watch.elapsedSeconds(); |
| 493 | |
| 494 | std::lock_guard lock(mutex); |
| 495 | |
| 496 | comparison_info_per_interval[connection_index]->add(seconds, progress.read_rows, progress.read_bytes, info.rows, info.bytes); |
| 497 | comparison_info_total[connection_index]->add(seconds, progress.read_rows, progress.read_bytes, info.rows, info.bytes); |
| 498 | |
| 499 | /// only compare the first two nodes |
| 500 | if (connection_index < 2) |
| 501 | t_test.add(connection_index, seconds); |
| 502 | } |
| 503 | |
| 504 | void report(MultiStats & infos) |
| 505 | { |
no test coverage detected