Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "add time print in transform" #4

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/Processors/ISimpleTransform.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <Processors/ISimpleTransform.h>
#include <Common/Stopwatch.h>
#include <common/logger_useful.h>


namespace DB
{
Expand Down Expand Up @@ -53,9 +52,6 @@ ISimpleTransform::Status ISimpleTransform::prepare()
{
if (input.isFinished())
{
LOG_DEBUG(&Poco::Logger::get(getName()),
"Processor {} used {} ms\n",
getName(), time/ 1000000UL);
output.finish();
return Status::Finished;
}
Expand Down Expand Up @@ -90,11 +86,7 @@ void ISimpleTransform::work()

try
{
Stopwatch watch;
watch.start();
transform(input_data.chunk, output_data.chunk);
time += watch.elapsedNanoseconds();
watch.stop();
}
catch (DB::Exception &)
{
Expand Down
1 change: 0 additions & 1 deletion src/Processors/ISimpleTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class ISimpleTransform : public IProcessor
bool has_output = false;
bool no_more_data_needed = false;
const bool skip_empty_chunks;
UInt64 time = 0;

/// Set input port NotNeeded after chunk was pulled.
/// Input port will become needed again only after data was transformed.
Expand Down
12 changes: 1 addition & 11 deletions src/Processors/ISource.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <Processors/ISource.h>
#include <Common/Stopwatch.h>
#include <common/logger_useful.h>


namespace DB
{
Expand Down Expand Up @@ -51,23 +50,14 @@ void ISource::work()
{
try
{
Stopwatch watch;
watch.start();
if (auto chunk = tryGenerate())
{
current_chunk.chunk = std::move(*chunk);
if (current_chunk.chunk)
has_input = true;
time += watch.elapsedNanoseconds();
}
else
{
finished = true;
LOG_DEBUG(&Poco::Logger::get(getName()),
"Processor {} used {} ms\n",
getName(), time/ 1000000UL);
}


if (isCancelled())
finished = true;
Expand Down
1 change: 0 additions & 1 deletion src/Processors/ISource.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class ISource : public IProcessor
bool finished = false;
bool got_exception = false;
Port::Data current_chunk;
UInt64 time = 0;

virtual Chunk generate();
virtual std::optional<Chunk> tryGenerate();
Expand Down