|
Zip and Skip Tries
|
Implements utilities for saving performance data and formatting time. More...

Go to the source code of this file.
Functions | |
| void | save_search_data (const std::string &method, size_t n, size_t m, size_t l, size_t num_nanoseconds, size_t num_repetitions, size_t min_par_compare, bool is_genetic) |
| Saves search performance data to a CSV file. | |
| void | save_construction_data (const std::string &method, size_t n, size_t m, size_t l, size_t num_nanoseconds, size_t num_repetitions, size_t min_par_compare, bool is_genetic) |
| Saves construction performance data to a CSV file. | |
| void | save_removal_data (const std::string &method, size_t n, size_t m, size_t l, size_t num_nanoseconds, size_t num_repetitions, size_t min_par_compare, bool is_genetic) |
| Saves removal performance data to a CSV file. | |
| std::string | get_hostname () |
| Retrieves the hostname of the machine executing the code. | |
| std::string | pretty_print (size_t nanoseconds) |
| Converts a duration in nanoseconds to a human-readable string format. | |
Implements utilities for saving performance data and formatting time.
Definition in file data.cpp.
| std::string get_hostname | ( | ) |
Retrieves the hostname of the machine executing the code.
Implemented by reading from /proc/sys/kernel/hostname on Linux systems.
Definition at line 50 of file data.cpp.
| std::string pretty_print | ( | size_t | nanoseconds | ) |
Converts a duration in nanoseconds to a human-readable string format.
Formats the time into hours (h), minutes (m), seconds (s), and milliseconds (ms) as appropriate.
| nanoseconds | The duration in nanoseconds. |
Definition at line 65 of file data.cpp.
| void save_construction_data | ( | const std::string & | method, |
| size_t | n, | ||
| size_t | m, | ||
| size_t | l, | ||
| size_t | num_nanoseconds, | ||
| size_t | num_repetitions = 1, |
||
| size_t | min_par_compare = 0, |
||
| bool | is_genetic = false |
||
| ) |
Saves construction performance data to a CSV file.
Appends a record to a CSV file named based on the hostname, method, and data type. The file stores parameters and timing results for data structure construction operations.
| method | A string identifying the construction method or data structure used (e.g., "SkipTrie", "ParallelZipTrie"). |
| n | The number of elements inserted during the construction. |
| m | The characteristic length of the elements being inserted (e.g., average or fixed string length). |
| l | A parameter potentially representing the average LCP length of the inserted data, or another characteristic. |
| num_nanoseconds | The total time taken for the construction operation(s), in nanoseconds. |
| num_repetitions | The number of times the construction operation was repeated or batched. Defaults to 1. |
| min_par_compare | A parameter potentially related to parallel comparison thresholds used during construction. Defaults to 0. |
| is_genetic | Flag indicating whether the data pertains to genetic (true) or synthetic (false) datasets. Defaults to false. |
Definition at line 24 of file data.cpp.
| void save_removal_data | ( | const std::string & | method, |
| size_t | n, | ||
| size_t | m, | ||
| size_t | l, | ||
| size_t | num_nanoseconds, | ||
| size_t | num_repetitions = 1, |
||
| size_t | min_par_compare = 0, |
||
| bool | is_genetic = false |
||
| ) |
Saves removal performance data to a CSV file.
Appends a record to a CSV file named based on the hostname, method, and data type. The file stores parameters and timing results for data structure removal operations.
| method | A string identifying the removal method or data structure used (e.g., "SkipTrie", "ParallelZipTrie"). |
| n | The number of elements present before removal or the number of elements removed. |
| m | The characteristic length of the elements being removed (e.g., average or fixed string length). |
| l | A parameter potentially representing the LCP or other characteristic related to the removed elements. |
| num_nanoseconds | The total time taken for the removal operation(s), in nanoseconds. |
| num_repetitions | The number of times the removal operation was repeated or batched. Defaults to 1. |
| min_par_compare | A parameter potentially related to parallel comparison thresholds used during removal. Defaults to 0. |
| is_genetic | Flag indicating whether the data pertains to genetic (true) or synthetic (false) datasets. Defaults to false. |
Definition at line 37 of file data.cpp.
| void save_search_data | ( | const std::string & | method, |
| size_t | n, | ||
| size_t | m, | ||
| size_t | l, | ||
| size_t | num_nanoseconds, | ||
| size_t | num_repetitions = 1, |
||
| size_t | min_par_compare = 0, |
||
| bool | is_genetic = false |
||
| ) |
Saves search performance data to a CSV file.
Appends a record to a CSV file named based on the hostname, method, and data type. The file stores parameters and timing results for search operations.
| method | A string identifying the search method or data structure used (e.g., "SkipTrie", "ParallelZipTrie"). |
| n | The number of elements in the data structure when the search was performed. |
| m | The length of the search key (e.g., number of characters or bits). |
| l | The Longest Common Prefix (LCP) length between the search key and its path/result in the structure. |
| num_nanoseconds | The total time taken for the search operation(s), in nanoseconds. |
| num_repetitions | The number of times the search operation was repeated to get the total time. Defaults to 1. |
| min_par_compare | A parameter potentially related to parallel comparison thresholds (specific meaning depends on context). Defaults to 0. |
| is_genetic | Flag indicating whether the data pertains to genetic (true) or synthetic (false) datasets. Defaults to false. |
Definition at line 11 of file data.cpp.