mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Merge pull request #9254 from ClickHouse/fix-ndebuf-in-pipeline-executor
Fix NDEBUG in PipelineExecutor.
This commit is contained in:
commit
79d194119b
@ -263,7 +263,7 @@ bool PipelineExecutor::prepareProcessor(UInt64 pid, size_t thread_number, Queue
|
||||
std::vector<Edge *> updated_direct_edges;
|
||||
|
||||
{
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
Stopwatch watch;
|
||||
#endif
|
||||
|
||||
@ -279,7 +279,7 @@ bool PipelineExecutor::prepareProcessor(UInt64 pid, size_t thread_number, Queue
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
node.execution_state->preparation_time_ns += watch.elapsed();
|
||||
#endif
|
||||
|
||||
@ -468,7 +468,7 @@ void PipelineExecutor::execute(size_t num_threads)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
LOG_TRACE(log, "Exception while executing query. Current state:\n" << dumpPipeline());
|
||||
#endif
|
||||
throw;
|
||||
@ -491,7 +491,7 @@ void PipelineExecutor::execute(size_t num_threads)
|
||||
|
||||
void PipelineExecutor::executeSingleThread(size_t thread_num, size_t num_threads)
|
||||
{
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
UInt64 total_time_ns = 0;
|
||||
UInt64 execution_time_ns = 0;
|
||||
UInt64 processing_time_ns = 0;
|
||||
@ -577,13 +577,13 @@ void PipelineExecutor::executeSingleThread(size_t thread_num, size_t num_threads
|
||||
addJob(state);
|
||||
|
||||
{
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
Stopwatch execution_time_watch;
|
||||
#endif
|
||||
|
||||
state->job();
|
||||
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
execution_time_ns += execution_time_watch.elapsed();
|
||||
#endif
|
||||
}
|
||||
@ -594,7 +594,7 @@ void PipelineExecutor::executeSingleThread(size_t thread_num, size_t num_threads
|
||||
if (finished)
|
||||
break;
|
||||
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
Stopwatch processing_time_watch;
|
||||
#endif
|
||||
|
||||
@ -648,13 +648,13 @@ void PipelineExecutor::executeSingleThread(size_t thread_num, size_t num_threads
|
||||
doExpandPipeline(task, false);
|
||||
}
|
||||
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
processing_time_ns += processing_time_watch.elapsed();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
total_time_ns = total_time_watch.elapsed();
|
||||
wait_time_ns = total_time_ns - execution_time_ns - processing_time_ns;
|
||||
|
||||
@ -769,7 +769,7 @@ String PipelineExecutor::dumpPipeline() const
|
||||
WriteBufferFromOwnString buffer;
|
||||
buffer << "(" << node.execution_state->num_executed_jobs << " jobs";
|
||||
|
||||
#ifndef N_DEBUG
|
||||
#ifndef NDEBUG
|
||||
buffer << ", execution time: " << node.execution_state->execution_time_ns / 1e9 << " sec.";
|
||||
buffer << ", preparation time: " << node.execution_state->preparation_time_ns / 1e9 << " sec.";
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user