summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2024-05-14 16:04:43 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2024-05-14 16:04:43 -0400
commitc49543e5c23af6bee35c7164ba433fc663c79041 (patch)
tree761462e3efa6a54f6b9838ab888e3428d85aefda
parentb1eca8192b7bc17f13c8f3aeae9e79f6bc03347c (diff)
downloaddynamic-extension-c49543e5c23af6bee35c7164ba433fc663c79041.tar.gz
Removed patricia trie stuff
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt13
-rw-r--r--benchmarks/louds_insertion_tput.cpp112
m---------external/louds-patricia0
4 files changed, 1 insertions, 127 deletions
diff --git a/.gitmodules b/.gitmodules
index 0cb5e92..cfa1326 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -16,9 +16,6 @@
[submodule "external/ctpl"]
path = external/ctpl
url = git@github.com:vit-vit/CTPL.git
-[submodule "external/louds-patricia"]
- path = external/louds-patricia
- url = git@github.com:s-yata/louds-patricia.git
[submodule "external/louds-fst"]
path = external/louds-fst
url = git@github.com:kampersanda/fast_succinct_trie.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6dad75..e072d58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -145,12 +145,7 @@ if (tests)
add_executable(fst_tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/fst_tests.cpp)
target_link_libraries(fst_tests PUBLIC gsl check subunit pthread atomic)
target_link_options(fst_tests PUBLIC -mcx16)
- target_include_directories(fst_tests PRIVATE include external/psudb-common/cpp/include external/PLEX/include external/fast_succinct_trie/include external/louds-patricia)
-
- #add_executable(louds_tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/louds_tests.cpp)
- #target_link_libraries(louds_tests PUBLIC gsl check subunit pthread atomic)
- #target_link_options(louds_tests PUBLIC -mcx16)
- #target_include_directories(louds_tests PRIVATE include external/psudb-common/cpp/include external/PLEX/include external/fast_succinct_trie/include external/louds-patricia)
+ target_include_directories(fst_tests PRIVATE include external/psudb-common/cpp/include external/PLEX/include external/fast_succinct_trie/include)
endif()
if (vldb_bench)
@@ -295,12 +290,6 @@ if (bench)
target_link_options(string_insertion_tput PUBLIC -mcx16)
- add_executable(louds_insertion_tput ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/louds_insertion_tput.cpp)
- target_link_libraries(louds_insertion_tput PUBLIC gsl pthread atomic)
- target_include_directories(louds_insertion_tput PRIVATE include external external/fast_succinct_trie/include external/PGM-index/include external/PLEX/include benchmarks/include external/psudb-common/cpp/include external/louds-patricia)
- target_link_options(louds_insertion_tput PUBLIC -mcx16)
-
-
add_executable(query_workload_bench ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/query_workload_bench.cpp)
target_link_libraries(query_workload_bench PUBLIC gsl pthread atomic)
target_include_directories(query_workload_bench PRIVATE include external external/m-tree/cpp external/PGM-index/include external/PLEX/include benchmarks/include external/psudb-common/cpp/include)
diff --git a/benchmarks/louds_insertion_tput.cpp b/benchmarks/louds_insertion_tput.cpp
deleted file mode 100644
index d772f3b..0000000
--- a/benchmarks/louds_insertion_tput.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- *
- */
-
-#define ENABLE_TIMER
-
-#include <fstream>
-#include <sstream>
-
-#include "framework/DynamicExtension.h"
-#include "shard/LoudsPatricia.h"
-#include "query/pointlookup.h"
-#include "framework/interface/Record.h"
-
-#include "psu-util/timer.h"
-#include "psu-util/progress.h"
-
-
-typedef de::Record<const char *, uint64_t> Rec;
-typedef de::LoudsPatricia<Rec> Trie;
-typedef de::pl::Query<Rec, Trie> Q;
-typedef de::DynamicExtension<Rec, Trie, Q, de::LayoutPolicy::TEIRING, de::DeletePolicy::TAGGING, de::SerialScheduler> Ext;
-
-std::vector<std::unique_ptr<char[]>> strings;
-
-void insert_thread(int64_t start, int64_t end, Ext *extension) {
- for (uint64_t i=start; i<end; i++) {
- Rec r = {strings[i].get(), i, strlen(strings[i].get())};
- while (!extension->insert(r)) {
- _mm_pause();
- }
- }
-}
-
-void read_data(std::string fname, size_t n=10000000) {
- strings.reserve(n);
-
- std::fstream file;
- file.open(fname, std::ios::in);
-
- size_t i=0;
- std::string line;
- while (i < n && std::getline(file, line, '\n')) {
- strings.emplace_back(std::unique_ptr<char[]>(strdup(line.c_str())));
- i++;
- psudb::progress_update((double) i / (double) n, "Reading file:");
- }
-}
-
-void usage(char *name) {
- fprintf(stderr, "Usage:\n%s datafile record_count\n", name);
-}
-
-int main(int argc, char **argv) {
-
- if (argc < 3) {
- usage(argv[0]);
- exit(EXIT_FAILURE);
- }
-
- std::string fname = std::string(argv[1]);
- size_t n = atol(argv[2]);
-
- read_data(fname, n);
-
- if (strings.size() == 0) {
- fprintf(stderr, "[E]: No string data read from file. Aborting execution.\n");
- } else {
- fprintf(stderr, "Finished reading from file.\n");
- }
-
- std::vector<size_t> scale_factors = {2, 4, 6, 8, 10, 12};
- std::vector<size_t> buffer_sizes = {1000, 2000, 5000, 10000, 12000, 15000};
-
- for (auto &sf : scale_factors) {
- for (auto &bf_sz : buffer_sizes) {
-
- auto extension = new Ext(bf_sz, bf_sz, sf);
-
- TIMER_INIT();
- TIMER_START();
- insert_thread(0, strings.size(), extension);
- TIMER_STOP();
-
- auto total_time = TIMER_RESULT();
-
- size_t m = 100;
- TIMER_START();
- for (size_t i=0; i<m; i++) {
- size_t j = rand() % strings.size();
- de::pl::Parms<Rec> parms = {strings[j].get()};
-
- auto res = extension->query(&parms);
- auto ans = res.get();
- }
- TIMER_STOP();
-
- auto query_time = TIMER_RESULT();
-
- double i_tput = (double) n / (double) total_time * 1e9;
- size_t q_lat = query_time / m;
-
- fprintf(stdout, "%ld\t%ld\t%ld\t%lf\t%ld\t%ld\n", extension->get_record_count(),
- bf_sz, sf, i_tput, q_lat, extension->get_memory_usage());
-
- delete extension;
-
- fflush(stderr);
- }
- }
-}
-
diff --git a/external/louds-patricia b/external/louds-patricia
deleted file mode 160000
-Subproject f21a3af7377371abf48e6074627505d29fc45d8