提交 3384f3b7 编写于 作者: A Alexey Milovidov

Progress on task

上级 fc412f2d
...@@ -263,17 +263,13 @@ void MergingSortedBlockInputStream::readSuffixImpl() ...@@ -263,17 +263,13 @@ void MergingSortedBlockInputStream::readSuffixImpl()
const BlockStreamProfileInfo & profile_info = getProfileInfo(); const BlockStreamProfileInfo & profile_info = getProfileInfo();
double seconds = profile_info.total_stopwatch.elapsedSeconds(); double seconds = profile_info.total_stopwatch.elapsedSeconds();
std::stringstream message; if (!seconds)
message << std::fixed << std::setprecision(2) LOG_DEBUG_FORMATTED(log, "Merge sorted {} blocks, {} rows in 0 sec.", profile_info.blocks, profile_info.rows);
<< "Merge sorted " << profile_info.blocks << " blocks, " << profile_info.rows << " rows" else
<< " in " << seconds << " sec."; LOG_DEBUG_FORMATTED(log, "Merge sorted {} blocks, {} rows in {} sec., {} rows/sec., {}/sec",
profile_info.blocks, profile_info.rows, seconds,
if (seconds) profile_info.rows / seconds,
message << ", " formatReadableSizeWithBinarySuffix(profile_info.bytes / seconds));
<< profile_info.rows / seconds << " rows/sec., "
<< profile_info.bytes / 1000000.0 / seconds << " MB/sec.";
LOG_DEBUG(log, message.str());
} }
} }
...@@ -47,17 +47,13 @@ void MergingSortedTransform::onFinish() ...@@ -47,17 +47,13 @@ void MergingSortedTransform::onFinish()
double seconds = total_stopwatch.elapsedSeconds(); double seconds = total_stopwatch.elapsedSeconds();
std::stringstream message; if (!seconds)
message << std::fixed << std::setprecision(2) LOG_DEBUG_FORMATTED(log, "Merge sorted {} blocks, {} rows in 0 sec.", merged_data.totalChunks(), merged_data.totalMergedRows());
<< "Merge sorted " << merged_data.totalChunks() << " blocks, " << merged_data.totalMergedRows() << " rows" else
<< " in " << seconds << " sec."; LOG_DEBUG_FORMATTED(log, "Merge sorted {} blocks, {} rows in {} sec., {} rows/sec., {}/sec",
merged_data.totalChunks(), merged_data.totalMergedRows(), seconds,
if (seconds != 0) merged_data.totalMergedRows() / seconds,
message << ", " formatReadableSizeWithBinarySuffix(merged_data.totalAllocatedBytes() / seconds));
<< merged_data.totalMergedRows() / seconds << " rows/sec., "
<< merged_data.totalAllocatedBytes() / 1000000.0 / seconds << " MB/sec.";
LOG_DEBUG(log, message.str());
} }
} }
...@@ -949,13 +949,10 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mergePartsToTempor ...@@ -949,13 +949,10 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mergePartsToTempor
/// Print overall profiling info. NOTE: it may duplicates previous messages /// Print overall profiling info. NOTE: it may duplicates previous messages
{ {
double elapsed_seconds = merge_entry->watch.elapsedSeconds(); double elapsed_seconds = merge_entry->watch.elapsedSeconds();
LOG_DEBUG(log, LOG_DEBUG_FORMATTED(log, "Merge sorted {} rows, containing {} columns ({} merged, {} gathered) in {} sec., {} rows/sec., {}/sec.",
"Merge sorted " << merge_entry->rows_read << " rows" merge_entry->rows_read, all_column_names.size(), merging_column_names.size(), gathering_column_names.size(),
<< ", containing " << all_column_names.size() << " columns" elapsed_seconds, merge_entry->rows_read / elapsed_seconds,
<< " (" << merging_column_names.size() << " merged, " << gathering_column_names.size() << " gathered)" formatReadableSizeWithBinarySuffix(merge_entry->bytes_read_uncompressed / elapsed_seconds));
<< " in " << elapsed_seconds << " sec., "
<< merge_entry->rows_read / elapsed_seconds << " rows/sec., "
<< merge_entry->bytes_read_uncompressed / 1000000.0 / elapsed_seconds << " MB/sec.");
} }
if (merge_alg != MergeAlgorithm::Vertical) if (merge_alg != MergeAlgorithm::Vertical)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册