-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.cc
More file actions
62 lines (58 loc) · 2.35 KB
/
Copy pathconfig.cc
File metadata and controls
62 lines (58 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "config.h"
int SYSTEM_MODE = 0;
// ! pay attention: need modify this when use different database
int DB_TYPE = 0; // 0: PostgreSQL, 1: YashanDB, 2: MySQL
std::vector<std::string> DBConnection;
std::vector<YashanConnInfo> YashanDBConnections;
std::vector<MySQLConnInfo> MySQLConnections;
int worker_threads = 16;
int RouterInternalThreads = -1;
int ComputeNodeCount = 2;
uint64_t ATTEMPTED_NUM = 10000000;
int REGION_SIZE = 1000;
double AffinitySampleRate = 1;
int TPCC_WAREHOUSE_NUM = -1;
bool TPCCPartitionWarehouses = false;
double AffinityTxnRatio = 0;
uint64_t PARTITION_INTERVAL = 500000;
std::string partition_log_file_ = "partitioning_log.log";
int MetisWarmupRound = 1;
bool WarmupEnd = false;
int TxnPoolMaxSize = 500000;
int TxnQueueMaxSize = 10000;
int BatchRouterProcessSize = 10000;
int PreprocessBatchConcurrency = 1;
int PreparedBatchQueueLimit = 2;
int PreprocessInternalThreads = -1;
int BatchExecutorPOPTxnSize = 20;
int PreExtendPageSize = 300000; // 预分配页面大小
int PreExtendIndexPageSize = 50000; // 预分配索引页面大小
bool LOAD_DATA_ONLY = false;
bool SKIP_LOAD_DATA = false;
bool USE_UNLOGGED_TABLES = false;
bool DISABLE_TABLE_AUTOVACUUM = true;
std::vector<uint64_t> hottest_keys; // for debug
int NumBucket = 2;
bool Enable_Long_Txn = false; // 是否启用长事务
int Long_Txn_Length = 2; // 长事务的长度
int Long_Txn_Write_Pct = 10; // 长事务中每个操作默认10%概率为写
double Key_Page_Map_Cache_Ratio = 1.1; // 默认情况可以存的下
bool Enable_Fill_Pipeline_Bubble = true; // 默认保持原有行为
bool Enable_Important_Router_Batch_Log = true; // 默认保持原有重要逐batch日志
// global variables
int try_count = 10000;
std::atomic<int> exe_count{0}; // 这个是所有线程的总事务数
std::atomic<uint64_t> committed_xact_count{0};
std::atomic<uint64_t> aborted_xact_count{0};
std::atomic<uint64_t> concurrency_retry_count{0};
std::atomic<uint64_t> concurrency_retry_exhausted_count{0};
std::atomic<int> generated_txn_count{0}; // 这个是所有线程生成的总事务数
std::atomic<uint64_t> tx_id_generator{0}; // 全局事务ID生成器
int Workload_Type = 0; // 0: smallbank, 1: ycsb
bool dynamic_workload = false;
bool change_friend = false;
std::atomic<bool> stop_benchmark{false};
bool time_based_run = false;
int warmup_seconds = 180;
int run_seconds = 60;
int concurrency_retry_limit = 0;