Skip to content

Commit 2dca1a7

Browse files
committed
Removed enable_progress_estimation member from Reader class
1 parent 42e8829 commit 2dca1a7

2 files changed

Lines changed: 5 additions & 73 deletions

File tree

libtiledbvcf/src/read/reader.cc

Lines changed: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -706,29 +706,6 @@ bool Reader::next_read_batch_v2_v3() {
706706
// Get estimated records for verbose output
707707
read_state_.total_query_records_processed = 0;
708708
read_state_.query_estimated_num_records = 1;
709-
if (params_.enable_progress_estimation) {
710-
if (dataset_->metadata().version == TileDBVCFDataset::Version::V2) {
711-
read_state_.query_estimated_num_records =
712-
read_state_.query->est_result_size(
713-
TileDBVCFDataset::DimensionNames::V2::end_pos) /
714-
tiledb_datatype_size(
715-
dataset_->data_array()
716-
->schema()
717-
.domain()
718-
.dimension(TileDBVCFDataset::DimensionNames::V2::end_pos)
719-
.type());
720-
} else {
721-
read_state_.query_estimated_num_records =
722-
read_state_.query->est_result_size(
723-
TileDBVCFDataset::DimensionNames::V3::start_pos) /
724-
tiledb_datatype_size(
725-
dataset_->data_array()
726-
->schema()
727-
.domain()
728-
.dimension(TileDBVCFDataset::DimensionNames::V3::start_pos)
729-
.type());
730-
}
731-
}
732709

733710
return true;
734711
}
@@ -935,18 +912,6 @@ bool Reader::next_read_batch_v4() {
935912
read_state_.total_query_records_processed = 0;
936913
read_state_.query_estimated_num_records = 1;
937914

938-
if (params_.enable_progress_estimation) {
939-
read_state_.query_estimated_num_records =
940-
read_state_.query->est_result_size(
941-
TileDBVCFDataset::DimensionNames::V4::start_pos) /
942-
tiledb_datatype_size(
943-
dataset_->data_array()
944-
->schema()
945-
.domain()
946-
.dimension(TileDBVCFDataset::DimensionNames::V4::start_pos)
947-
.type());
948-
}
949-
950915
return true;
951916
}
952917

@@ -1154,26 +1119,11 @@ bool Reader::read_current_batch() {
11541119
complete = process_query_results_v2();
11551120
}
11561121

1157-
if (params_.enable_progress_estimation &&
1158-
read_state_.query_estimated_num_records > 0) {
1159-
LOG_INFO(
1160-
"Processed {} cells in {:.3f} sec. Reported {} cells. Approximately "
1161-
"{:.1f}% completed with query cells.",
1162-
read_state_.query_results.num_cells(),
1163-
utils::chrono_duration(processing_start_timer),
1164-
read_state_.last_num_records_exported - old_num_exported,
1165-
std::min(
1166-
100.0,
1167-
read_state_.total_query_records_processed /
1168-
static_cast<double>(read_state_.query_estimated_num_records) *
1169-
100.0));
1170-
} else {
1171-
LOG_INFO(
1172-
"Processed {} cells in {:.3f} sec. Reported {} cells.",
1173-
read_state_.query_results.num_cells(),
1174-
utils::chrono_duration(processing_start_timer),
1175-
read_state_.last_num_records_exported - old_num_exported);
1176-
}
1122+
LOG_INFO(
1123+
"Processed {} cells in {:.3f} sec. Reported {} cells.",
1124+
read_state_.query_results.num_cells(),
1125+
utils::chrono_duration(processing_start_timer),
1126+
read_state_.last_num_records_exported - old_num_exported);
11771127

11781128
// Return early if we couldn't process all the results.
11791129
if (!complete)
@@ -2808,13 +2758,6 @@ void Reader::set_check_samples_exist(const bool check_samples_exist) {
28082758
params_.check_samples_exist = check_samples_exist;
28092759
}
28102760

2811-
void Reader::set_enable_progress_estimation(
2812-
const bool& enable_progress_estimation) {
2813-
LOG_DEBUG(
2814-
"setting enable_progress_estimation to {}", enable_progress_estimation);
2815-
params_.enable_progress_estimation = enable_progress_estimation;
2816-
}
2817-
28182761
void Reader::set_debug_print_vcf_regions(const bool print_vcf_regions) {
28192762
params_.debug_params.print_vcf_regions = print_vcf_regions;
28202763
}

libtiledbvcf/src/read/reader.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ struct ExportParams {
123123
// because we have to fetch the list of samples from the VCF header array
124124
bool check_samples_exist = true;
125125

126-
// Should we skip trying to estimate the number of records and percent
127-
// complete? This is useful when you want verbose but not the performance
128-
// impact.
129-
bool enable_progress_estimation = false;
130-
131126
// Debug parameters for optional debug information
132127
struct DebugParams debug_params;
133128

@@ -521,12 +516,6 @@ class Reader {
521516
*/
522517
void set_scan_all_samples(bool scan_all_samples);
523518

524-
/**
525-
* Sets disabling of progress estimation in verbose mode
526-
* @param enable_progress_estimation setting
527-
*/
528-
void set_enable_progress_estimation(const bool& enable_progress_estimation);
529-
530519
/**
531520
* Percentage of buffer size to tiledb memory budget
532521
* @param buffer_percentage

0 commit comments

Comments
 (0)