OmniSciDB  04ee39c94c
anonymous_namespace{StoragePerfTest.cpp} Namespace Reference

Functions

void run_ddl_statement (const string &input_str)
 
bool load_data_test (string table_name, size_t num_rows)
 
static size_t load_data_for_thread_test_2 (int num_rows, string table_name)
 

Function Documentation

◆ load_data_for_thread_test_2()

static size_t anonymous_namespace{StoragePerfTest.cpp}::load_data_for_thread_test_2 ( int  num_rows,
string  table_name 
)
static

Definition at line 68 of file StoragePerfTest.cpp.

References QueryRunner::QueryRunner::get(), num_rows, populate_table_random(), and SMALL.

Referenced by TEST().

68  {
69  int initial_num_rows, num_rows_step;
70  initial_num_rows = num_rows_step = SMALL / 2; // insert 5M rows per iteration
71  vector<size_t> insert_col_hashs;
72 
73  if (num_rows <
74  initial_num_rows) { // to handle special case when only few rows should be added
75  insert_col_hashs =
76  populate_table_random(table_name, num_rows, *QR::get()->getCatalog());
77  } else {
78  for (int cur_num_rows = initial_num_rows; cur_num_rows <= num_rows;
79  cur_num_rows += num_rows_step) {
80  if (cur_num_rows == num_rows) {
81  insert_col_hashs =
82  populate_table_random(table_name, num_rows_step, *QR::get()->getCatalog());
83  } else {
84  populate_table_random(table_name, num_rows_step, *QR::get()->getCatalog());
85  }
86  }
87  }
88  return insert_col_hashs.size();
89 }
const int8_t const int64_t * num_rows
#define SMALL
std::vector< size_t > populate_table_random(const std::string &table_name, const size_t num_rows, const Catalog &cat)
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_data_test()

bool anonymous_namespace{StoragePerfTest.cpp}::load_data_test ( string  table_name,
size_t  num_rows 
)

Definition at line 59 of file StoragePerfTest.cpp.

References QueryRunner::QueryRunner::get(), and populate_table_random().

Referenced by TEST().

59  {
60  vector<size_t> insert_col_hashs =
61  populate_table_random(table_name, num_rows, *QR::get()->getCatalog());
62  return true;
63 }
const int8_t const int64_t * num_rows
std::vector< size_t > populate_table_random(const std::string &table_name, const size_t num_rows, const Catalog &cat)
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run_ddl_statement()

void anonymous_namespace{StoragePerfTest.cpp}::run_ddl_statement ( const string &  input_str)
inline

Definition at line 55 of file StoragePerfTest.cpp.

References QueryRunner::QueryRunner::get(), and QueryRunner::QueryRunner::runDDLStatement().

55  {
56  QR::get()->runDDLStatement(input_str);
57 }
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function: