Skip to content
Snippets Groups Projects
Commit 4c100e76 authored by Thomas Owen James's avatar Thomas Owen James :speech_balloon:
Browse files

fixed slice re-assignment for output by size

parent 810c0880
No related branches found
Tags v1.5.1
1 merge request!54fixed slice re-assignment for output by size
Pipeline #5234167 passed
......@@ -54,6 +54,7 @@ OutputBySizeStream::OutputBySizeStream(const std::string output_filename_base,
control(c),
current_file(0),
current_run_number(0),
min_buffer_queue_size_(1000),
journal_name(my_output_filename_base + "/" + output_filename_prefix + '_' + journal_file) {
LOG(TRACE) << "Created output filter at " << static_cast<void *>(this);
......@@ -113,8 +114,14 @@ void *OutputBySizeStream::operator()(void *item) {
close_and_move_current_file();
file_count = -1;
}
if (Slice::current_queue_size() < min_buffer_queue_size_) {
LOG(TRACE) << "New minimum queue size is " << Slice::current_queue_size() << " total counts "
<< totcounts;
min_buffer_queue_size_ = Slice::current_queue_size();
}
Slice::giveAllocated(&out);
out.free();
return NULL;
}
......
......@@ -30,6 +30,7 @@ class OutputBySizeStream : public tbb::filter {
FILE *current_file;
uint32_t current_run_number;
std::string journal_name;
size_t min_buffer_queue_size_;
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment