MCPcopy Create free account
hub / github.com/ByConity/ByConity / execute

Method execute

programs/benchmark/Benchmark.cpp:468–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 15

mainMethod · 0.45
runFunction · 0.45
getShardPartitionsMethod · 0.45
main.jsFile · 0.45
onFinishFunction · 0.45
getRecentQueriesFunction · 0.45
getDataFromEngineFunction · 0.45

Calls 10

disconnectMethod · 0.45
emptyMethod · 0.45
setQueryIdMethod · 0.45
setProgressCallbackMethod · 0.45
readPrefixMethod · 0.45
readMethod · 0.45
readSuffixMethod · 0.45
elapsedSecondsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected