30 T&
New(
const std::string &filename)
34 ofs_.open(filename.c_str(), std::ios_base::out | std::ios_base::trunc);
101 query_compilation_time_(0.0),
102 preprocessing_time_(0.0),
103 query_transfer_time_(0.0),
104 data_transfer_time_(0.0),
105 constant_transfer_time_(0.0),
106 allocation_time_(0.0),
112 hash_table_capacity_per_query_(0),
116 num_items_in_hash_table_size_(0),
123 ofs <<
"codec" <<
"," 124 <<
"overallTime" <<
"," 125 <<
"queryCompilationTime" <<
"," 126 <<
"preprocessingTime" <<
"," 127 <<
"queryTransferTime" <<
"," 128 <<
"dataTransferTime" <<
"," 129 <<
"constantTransferTime" <<
"," 130 <<
"allocationTime" <<
"," 131 <<
"fillingTime" <<
"," 132 <<
"matchingTime" <<
"," 133 <<
"convertTime" <<
"," 136 <<
"hashTableCapacityPerQuery" <<
"," 137 <<
"thresholdSize" <<
"," 138 <<
"passCountSize" <<
"," 139 <<
"bitMapSize" <<
"," 140 <<
"numItemsInHashTableSize" <<
"," 141 <<
"topksSize" <<
"," 142 <<
"hashTableSize" <<
"," 143 <<
"comprRatio" << std::endl;
148 std::string codec_name(
"no");
152 ofs << codec_name <<
"," 153 << std::fixed << std::setprecision(3) << overall_time_ <<
"," 154 << std::fixed << std::setprecision(3) << query_compilation_time_ <<
"," 155 << std::fixed << std::setprecision(3) << preprocessing_time_ <<
"," 156 << std::fixed << std::setprecision(3) << query_transfer_time_ <<
"," 157 << std::fixed << std::setprecision(3) << data_transfer_time_ <<
"," 158 << std::fixed << std::setprecision(3) << constant_transfer_time_ <<
"," 159 << std::fixed << std::setprecision(3) << allocation_time_ <<
"," 160 << std::fixed << std::setprecision(3) << filling_time_ <<
"," 161 << std::fixed << std::setprecision(3) << matching_time_ <<
"," 162 << std::fixed << std::setprecision(3) << convert_time_ <<
"," 165 << hash_table_capacity_per_query_ <<
"," 166 << threshold_size_ <<
"," 167 << passcount_size_ <<
"," 168 << bitmap_size_ <<
"," 169 << num_items_in_hash_table_size_ <<
"," 170 << topks_size_ <<
"," 171 << hash_table_size_ <<
"," 172 << std::fixed << std::setprecision(3) << compr_ratio_ << std::endl;
183 overall_time_ = overall_time;
189 query_compilation_time_ = query_compilation_time;
195 preprocessing_time_ = preprocessing_time;
201 query_transfer_time_ = query_transfer_time;
207 data_transfer_time_ = data_transfer_time;
213 constant_transfer_time_ = constant_transfer_time;
219 allocation_time_ = allocation_time;
225 filling_time_ = filling_time;
231 matching_time_ = matching_time;
237 convert_time_ = convert_time;
243 inv_size_ = inv_size;
249 dims_size_ = dims_size;
255 hash_table_capacity_per_query_ = hash_table_capacity_per_query;
261 threshold_size_ = threshold_size;
267 passcount_size_ = passcount_size;
273 bitmap_size_ = bitmap_size;
279 num_items_in_hash_table_size_ = num_items_in_hash_table_size;
285 topks_size_ = topks_size;
291 hash_table_size_ = hash_table_size;
297 compr_ratio_ = compr_ratio;
337 ofs <<
"array_size" <<
"," 339 <<
"throughput" << std::endl;
344 ofs << array_size_ <<
"," 346 << throughput_ << std::endl;
351 array_size_ = array_size;
363 throughput_ = throughput;
385 ofs <<
"codec" <<
"," 386 <<
"array_size" <<
"," 387 <<
"compr_size" <<
"," 390 <<
"throughput" << std::endl;
395 ofs << static_cast<int>(codec_) <<
"," 396 << array_size_ <<
"," 397 << compr_size_ <<
"," 398 << compr_ratio_ <<
"," 400 << throughput_ << std::endl;
411 array_size_ = array_size;
417 compr_size_ = compr_size;
423 compr_ratio_ = compr_ratio;
435 throughput_ = throughput;
T & New(const std::string &filename)
void WriteLine(std::ofstream &ofs)
void WriteHeader(std::ofstream &ofs)
MatchingPerfData & OverallTime(float overall_time)
float query_compilation_time_
This is the top-level namespace of the project.
void WriteLine(std::ofstream &ofs)
void WriteLine(std::ofstream &ofs)
MatchingPerfData & ThresholdSize(size_t threshold_size)
MatchingPerfData & HashTableCapacityPerQuery(size_t hash_table_capacity_per_query)
MatchingPerfData & AllocationTime(float allocation_time)
MatchingPerfData & ConstantTransferTime(float constant_transfer_time)
ScanPerfData & Throughput(float throughput)
MatchingPerfData & DimsSize(size_t dims_size)
ScanPerfData & ArraySize(size_t array_size)
PerfLogger< T > & operator=(PerfLogger const &)
MatchingPerfData & NumItemsInHashTableSize(size_t num_items_in_hash_table_size)
float constant_transfer_time_
MatchingPerfData & FillingTime(float filling_time)
MatchingPerfData & TopksSize(size_t topks_size)
MatchingPerfData & HashTableSize(size_t hash_table_size)
float preprocessing_time_
genie::compression::COMPRESSION_TYPE compr_
MatchingPerfData & MatchingTime(float matching_time)
CodecPerfData & ComprRatio(float compr_ratio)
CodecPerfData & Codec(genie::compression::COMPRESSION_TYPE codec)
float query_transfer_time_
MatchingPerfData & PreprocessingTime(float preprocessing_time)
size_t hash_table_capacity_per_query_
std::unique_ptr< T > perf_data_
MatchingPerfData & PasscountSize(size_t passcount_size)
MatchingPerfData & ComprRatio(float compr_ratio)
Record run-time information.
MatchingPerfData & DataTransferTime(float data_transfer_time)
static PerfLogger & Instance()
MatchingPerfData & QueryCompilationTime(float query_compilation_time)
CodecPerfData & ComprSize(size_t compr_size)
size_t num_items_in_hash_table_size_
void WriteHeader(std::ofstream &ofs)
ScanPerfData & Time(float time)
MatchingPerfData & QueryTransferTime(float query_transfer_time)
CodecPerfData & ArraySize(size_t array_size)
float data_transfer_time_
MatchingPerfData & InvSize(size_t inv_size)
MatchingPerfData & BitmapSize(size_t bitmap_size)
MatchingPerfData & Compr(genie::compression::COMPRESSION_TYPE compr)
MatchingPerfData & ConvertTime(float convert_time)
CodecPerfData & Throughput(float throughput)
CodecPerfData & Time(float time)
static std::string getCompressionName(COMPRESSION_TYPE type)
void WriteHeader(std::ofstream &ofs)
genie::compression::COMPRESSION_TYPE codec_