#include "Tests/smart_tests.hpp" void write_fpp_to_file(); int main() { write_fpp_to_file(); return 0; } void write_fpp_to_file() { using CF8 = cuckoofilter::CuckooFilter; using CF12 = cuckoofilter::CuckooFilter; using CF16 = cuckoofilter::CuckooFilter; using CF32 = cuckoofilter::CuckooFilter; using CF8_N2 = cuckoofilter::CuckooFilterStable; using CF12_Flex = cuckoofilter::CuckooFilterStable; using CF16_N2 = cuckoofilter::CuckooFilterStable; using CF32_N2 = cuckoofilter::CuckooFilterStable; using inc4 = Prefix_Filter>; using inc6 = Prefix_Filter; using inc8 = Prefix_Filter; using inc9 = Prefix_Filter>; using L_BF8 = bloomfilter::BloomFilter; using L_BF12 = bloomfilter::BloomFilter; using L_BF16 = bloomfilter::BloomFilter; constexpr size_t fp_capacity = ((1ULL << 28) * 94 / 100) / testSmart::db_speeder; constexpr size_t fp_lookups = fp_capacity; std::vector fp_v_add, fp_v_find; testSmart::fill_vec_smart(&fp_v_add, fp_capacity); testSmart::fill_vec_smart(&fp_v_find, fp_lookups); std::string path = "../scripts/fpp_table.csv"; std::fstream file(path, std::fstream::in | std::fstream::out | std::fstream::app); file << "n =, " << fp_capacity << ", Lookups =, " << fp_lookups << std::endl; std::string header = "Filter, Size in bytes, Ratio of yes-queries bits per item (average), optimal bits per item (w.r.t. yes-queries), difference of BPI to optimal BPI, ratio of BPI to optimal BPI"; // file << "name, byte size, FPR, BPI, opt-BPI, bpi-additive-difference, bpi-ratio" << std::endl; file << header << std::endl; file.close(); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test>(&fp_v_add, &fp_v_find, path); testSmart::FPR_test>(&fp_v_add, &fp_v_find, path); testSmart::FPR_test>(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); testSmart::FPR_test(&fp_v_add, &fp_v_find, path); }