Benchmarks
The bench/
directory hosts example programs, micro-benchmarks, and development utilities built on top of ORQ.
Sub-directories:
queries/
– End-to-end analytical queries and demonstrations.tpch/
- TPC-H queriessecretflow/
- comparisons with SecretFlowother/
- all other queries from competitors
micro/
– Small micro-benchmarks targeting specific primitives.
For more information on the queries, see the C++ source files. Below, documentation for the data-generation classes is provided.
TPCH Database Generator.
Reference: Ch. 1 of the TPC-H Specification, https://www.tpc.org/TPC_Documents_Current_Versions/pdf/TPC-H_v3.0.1.pdf
Naming semantics:
Table names are all capitalized
Column names should use PascalCase
Column names should not use table prefixes, unless required for disambiguation in a query. In that case, a single-character table identifer can be prepended, with an underscore (e.g.,
O_Comment
)
Defines
-
CUSTOMERS_MULTIPLIER
-
ORDERS_MULTIPLIER
-
PART_MULTIPLIER
-
SUPPLIER_MULTIPLIER
-
PARTSUPP_MULTIPLIER
-
NATION_SIZE
-
REGION_SIZE
-
PARTSUPP_PER_PART
-
CUSTOMER_ORDER_FRACTION
-
COMMENT_BITS
-
TPCH_DATE_THRESHOLD
-
TPCH_DATE_INTERVAL
-
TPCH_DISCOUNT_THRESHOLD
-
TPCH_QUANTITY_THRESHOLD
-
template<typename T = int>
class TPCDatabase - #include <tpch_dbgen.h>
Public Functions
-
inline TPCDatabase(double sf)
-
inline TPCDatabase(double sf, sqlite3 *sqlite_db)
-
inline size_t customersSize()
-
inline size_t ordersSize()
-
inline size_t lineitemsSize()
-
inline size_t partSize()
-
inline size_t partSuppSize()
-
inline size_t supplierSize()
-
inline size_t nationSize()
-
inline size_t regionSize()
-
inline EncodedTable<T> getLineitemTable(bool proactive_sharing = false)
Get the Lineitem Table object.
- Parameters:
proactive_sharing – whether to use proactive sharing: also return in the table secret-shared values with constant thresholds subtracted off already.
- Returns:
EncodedTable<T>
-
inline TPCDatabase(double sf)
Defines
-
SECRECY_R_SIZE
-
SECRECY_S_SIZE
-
SECRECY_T1_SIZE
-
SECRECY_T2_SIZE
-
SECRECY_T3_SIZE
-
DIAGNOSIS_SIZE
-
MEDICATION_SIZE
-
STANDARD_SIZE
-
template<typename T = int>
class SecrecyDatabase : public TPCDatabase<int> - #include <secrecy_dbgen.h>