Move db perf tests to a separate exec 27/238627/2
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 15 Jul 2020 19:25:26 +0000 (21:25 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 16 Jul 2020 11:09:22 +0000 (13:09 +0200)
Performance tests are not unit tests and do not improve code coverage. Also
they are all "positive". This commit moves them to a separate binary.

Also fixed performance calculation and few other minor issues.

Code slightly refactored.

Change-Id: Ifcf2463be28001a0e88e5127dd95ee081771382a

common/DBFixture.cpp [moved from unit-tests/DBFixture.cpp with 85% similarity]
common/DBFixture.h [moved from unit-tests/DBFixture.h with 85% similarity]
common/test_common.cpp [moved from unit-tests/test_common.cpp with 100% similarity]
common/test_common.h [moved from unit-tests/test_common.h with 100% similarity]
misc/CMakeLists.txt
misc/db_perf/CMakeLists.txt [new file with mode: 0644]
misc/db_perf/test_db_perf.cpp [new file with mode: 0644]
packaging/key-manager.spec
unit-tests/CMakeLists.txt
unit-tests/test_db_crypto.cpp

similarity index 85%
rename from unit-tests/DBFixture.cpp
rename to common/DBFixture.cpp
index 3f8c3cc..ee85abc 100644 (file)
  * @brief
  */
 #include <boost/test/unit_test.hpp>
-#include <db-crypto.h>
-#include <ckm/ckm-error.h>
+#include <test_common.h>
 #include <DBFixture.h>
 #include <fstream>
 
 using namespace CKM;
-using namespace std::chrono;
 
 static void copyFile(const char *src, const char *dst)
 {
@@ -66,9 +64,6 @@ DBFixture::DBFixture(const char *legacy_db_fname, const char *db_fname, DBCrypto
 
 void DBFixture::init(DBCryptoThrows dbCryptoThrows)
 {
-       high_resolution_clock::time_point srand_feed = high_resolution_clock::now();
-       srand(srand_feed.time_since_epoch().count());
-
        switch (dbCryptoThrows) {
                case DBCryptoThrows::yes:
                        BOOST_REQUIRE_THROW(m_db = DB::Crypto(m_crypto_legacy_db_fname, m_crypto_db_fname, defaultPass), Exc::DatabaseFailed);
@@ -79,31 +74,6 @@ void DBFixture::init(DBCryptoThrows dbCryptoThrows)
        }
 }
 
-double DBFixture::performance_get_time_elapsed_ms()
-{
-       return duration_cast<milliseconds>(m_end_time - m_start_time).count();
-}
-
-void DBFixture::performance_start(const char *operation_name)
-{
-       m_operation = std::string(operation_name ? operation_name : "unknown");
-       BOOST_TEST_MESSAGE("\t<performance> running " << m_operation <<
-                                          " performance test...");
-       m_start_time = high_resolution_clock::now();
-}
-
-void DBFixture::performance_stop(long num_operations_performed)
-{
-       m_end_time = high_resolution_clock::now();
-       double time_elapsed_ms = performance_get_time_elapsed_ms();
-       BOOST_TEST_MESSAGE("\t<performance> time elapsed: " << time_elapsed_ms <<
-                                          "[ms], number of " << m_operation << ": " << num_operations_performed);
-
-       if (num_operations_performed > 0)
-               BOOST_TEST_MESSAGE("\t<performance> average time per " << m_operation << ": " <<
-                                                  time_elapsed_ms / num_operations_performed << "[ms]");
-}
-
 void DBFixture::generate_name(unsigned int id, Name &output)
 {
        std::stringstream ss;
@@ -118,8 +88,7 @@ void DBFixture::generate_owner(unsigned int id, ClientId &output)
        output = ss.str();
 }
 
-void DBFixture::generate_perf_DB(unsigned int num_name,
-                                                                unsigned int names_per_owner)
+void DBFixture::generate_db(unsigned int num_name, unsigned int names_per_owner)
 {
        // to speed up data creation - cache the row
        DB::Row rowPattern = create_default_row(DataType::BINARY_DATA);
similarity index 85%
rename from unit-tests/DBFixture.h
rename to common/DBFixture.h
index fb036b6..2fd022a 100644 (file)
  */
 #pragma once
 
-#include <test_common.h>
 #include <ckm/ckm-type.h>
 #include <protocols.h>
-#include <chrono>
+#include <db-row.h>
+#include <data-type.h>
+#include <db-crypto.h>
 
 class DBFixture {
 public:
@@ -48,12 +49,8 @@ public:
        static CKM::DB::Row create_default_binary_row();
        static void compare_row(const CKM::DB::Row &lhs, const CKM::DB::Row &rhs);
 
-       // ::::::::::::::::::::::::: time measurement :::::::::::::::::::::::::
-       void performance_start(const char *operation_name);
-       void performance_stop(long num_operations_performed);
-
        // ::::::::::::::::::::::::: DB :::::::::::::::::::::::::
-       void generate_perf_DB(unsigned int num_name, unsigned int names_per_owner);
+       void generate_db(unsigned int num_name, unsigned int names_per_owner);
        long add_full_access_rights(unsigned int num_name,
                                                                unsigned int num_names_per_owner);
        void check_DB_integrity(const CKM::DB::Row &rowPattern);
@@ -69,11 +66,8 @@ public:
 
 private:
        void    init(DBCryptoThrows dbCryptoThrows);
-       double  performance_get_time_elapsed_ms();
        static void unlinkDb();
 
        constexpr static const char *m_crypto_legacy_db_fname = "/tmp/testme.db";
        constexpr static const char *m_crypto_db_fname = "/tmp/testme0.db";
-       std::string m_operation;
-       std::chrono::high_resolution_clock::time_point m_start_time, m_end_time;
 };
index 1dcd73f..b149a7e 100644 (file)
@@ -47,4 +47,5 @@ INSTALL(TARGETS ${CKM_TOOL}
      )
 ADD_SUBDIRECTORY(ckm_db_tool)
 ADD_SUBDIRECTORY(ckm_initial_values)
-ADD_SUBDIRECTORY(encryption_scheme)
\ No newline at end of file
+ADD_SUBDIRECTORY(encryption_scheme)
+ADD_SUBDIRECTORY(db_perf)
\ No newline at end of file
diff --git a/misc/db_perf/CMakeLists.txt b/misc/db_perf/CMakeLists.txt
new file mode 100644 (file)
index 0000000..672a079
--- /dev/null
@@ -0,0 +1,54 @@
+SET(DB_TEST_DIR ${UNIT_TESTS_DIR}/db)
+
+ADD_DEFINITIONS("-DBOOST_TEST_DYN_LINK")
+ADD_DEFINITIONS("-DDB_TEST_DIR=\"${DB_TEST_DIR}\"")
+
+SET(MANAGER_PATH ${PROJECT_SOURCE_DIR}/src/manager)
+
+INCLUDE_DIRECTORIES(SYSTEM ${KEY_MANAGER_DEP_INCLUDE_DIRS})
+
+INCLUDE_DIRECTORIES(
+    ${MANAGER_PATH}/dpl/db/include
+    ${MANAGER_PATH}/dpl/core/include
+    ${MANAGER_PATH}/dpl/log/include
+    ${MANAGER_PATH}/service
+    ${MANAGER_PATH}/common
+    ${PROJECT_SOURCE_DIR}/src/include
+    ${PROJECT_SOURCE_DIR}/common
+    ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+SET(DB_PERF_SOURCES
+    ${CMAKE_CURRENT_SOURCE_DIR}/test_db_perf.cpp
+
+    ${PROJECT_SOURCE_DIR}/common/colour_log_formatter.cpp
+    ${PROJECT_SOURCE_DIR}/common/DBFixture.cpp
+    ${PROJECT_SOURCE_DIR}/common/test_common.cpp
+
+    ${MANAGER_PATH}/dpl/core/src/colors.cpp
+    ${MANAGER_PATH}/dpl/db/src/naive_synchronization_object.cpp
+    ${MANAGER_PATH}/dpl/db/src/sql_connection.cpp
+    ${MANAGER_PATH}/service/db-crypto.cpp
+    ${MANAGER_PATH}/service/file-lock.cpp
+    ${MANAGER_PATH}/service/file-system.cpp
+    ${MANAGER_PATH}/service/for-each-file.cpp
+    ${MANAGER_PATH}/service/key-provider.cpp
+)
+
+SET(TARGET_CKM_DB_PERF "ckm_db_perf")
+
+ADD_EXECUTABLE(
+    ${TARGET_CKM_DB_PERF}
+    ${DB_PERF_SOURCES}
+)
+
+TARGET_LINK_LIBRARIES(
+    ${TARGET_CKM_DB_PERF}
+    ${TARGET_KEY_MANAGER_COMMON}
+    ${KEY_MANAGER_DEP_LIBRARIES}
+    ${KM_LINK_EXTRA_DEPS}
+    boost_unit_test_framework
+    -ldl
+)
+
+INSTALL(TARGETS ${TARGET_CKM_DB_PERF} DESTINATION bin)
diff --git a/misc/db_perf/test_db_perf.cpp b/misc/db_perf/test_db_perf.cpp
new file mode 100644 (file)
index 0000000..a7a6780
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ *  Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved
+ *
+ *  Contact: Dongsun Lee <ds73.lee@samsung.com>
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License
+ */
+#include <chrono>
+
+#define BOOST_TEST_MODULE KEY_MANAGER_DB_PREF
+#include <boost/test/results_reporter.hpp>
+#include <boost/test/unit_test.hpp>
+#include <boost/test/unit_test_log.hpp>
+
+#include <colour_log_formatter.h>
+#include <dpl/log/log.h>
+#include <log-setup.h>
+#include <DBFixture.h>
+
+
+using namespace CKM;
+
+namespace {
+constexpr unsigned OWNERS = 30;
+constexpr unsigned NAMES_PER_OWNER = 15;
+constexpr unsigned NAMES = OWNERS * NAMES_PER_OWNER;
+
+struct TestConfig {
+       TestConfig()
+       {
+               boost::unit_test::unit_test_log.set_threshold_level(
+                       boost::unit_test::log_test_units);
+               boost::unit_test::results_reporter::set_level(boost::unit_test::SHORT_REPORT);
+               boost::unit_test::unit_test_log.set_formatter(new CKM::colour_log_formatter);
+       }
+       ~TestConfig()
+       {
+       }
+};
+
+struct LogSetup {
+       LogSetup()
+       {
+               SetupClientLogSystem();
+               Singleton<Log::LogSystem>::Instance().SetTag("CKM_DB_PERF_TESTS");
+       }
+       ~LogSetup() {}
+};
+
+using namespace std::chrono;
+
+class Perf {
+public:
+       Perf(const char *operation_name, long iterations = 0) {
+               m_operation = std::string(operation_name ? operation_name : "unknown");
+               BOOST_TEST_MESSAGE("\t<performance> running " << m_operation <<
+                                  " performance test...");
+               m_start_time = high_resolution_clock::now();
+               m_iterations = iterations;
+       }
+
+       ~Perf() {
+               auto end_time = high_resolution_clock::now();
+               double time_elapsed_ms = duration_cast<milliseconds>(end_time - m_start_time).count();
+               BOOST_TEST_MESSAGE("\t<performance> time elapsed: " << time_elapsed_ms <<
+                                  "[ms], number of " << m_operation << ": " << m_iterations);
+
+               if (m_iterations > 0)
+                       BOOST_TEST_MESSAGE("\t<performance> average time per " << m_operation << ": " <<
+                                          time_elapsed_ms / m_iterations << "[ms]");
+       }
+
+       void setIterations(long iterations) {
+               m_iterations = iterations;
+       }
+
+private:
+       std::string m_operation;
+       std::chrono::high_resolution_clock::time_point m_start_time;
+       long m_iterations;
+};
+
+}
+
+BOOST_GLOBAL_FIXTURE(TestConfig);
+BOOST_GLOBAL_FIXTURE(LogSetup);
+
+BOOST_FIXTURE_TEST_SUITE(DBCRYPTO_PERF_TEST, DBFixture)
+
+BOOST_AUTO_TEST_CASE(DBperfAddNames)
+{
+       constexpr unsigned ITERATIONS = 1000;
+
+       // actual test
+       Perf perf("saveRow", ITERATIONS);
+       {
+               generate_db(ITERATIONS, NAMES_PER_OWNER);
+       }
+}
+
+BOOST_AUTO_TEST_CASE(DBperfLookupAliasByOwner)
+{
+       constexpr unsigned ITERATIONS = 1000;
+
+       // prepare data
+       generate_db(NAMES, NAMES_PER_OWNER);
+
+       Name name;
+       ClientId owner;
+
+       // actual test - successful lookup
+       Perf perf("getRow", ITERATIONS * NAMES_PER_OWNER);
+
+       unsigned seed = 0;
+
+       for (unsigned t = 0; t < ITERATIONS; t++) {
+               int owner_num = rand_r(&seed) % OWNERS;
+               generate_owner(owner_num, owner);
+
+               unsigned start_name = owner_num * NAMES_PER_OWNER;
+
+               for (unsigned name_num = start_name;
+                               name_num < (start_name + NAMES_PER_OWNER); name_num++) {
+                       generate_name(name_num, name);
+                       read_row_expect_success(name, owner);
+
+               }
+       }
+}
+
+BOOST_AUTO_TEST_CASE(DBperfLookupAliasRandomOwnership)
+{
+       constexpr unsigned ITERATIONS = 10000;
+
+       // prepare data
+       generate_db(NAMES, NAMES_PER_OWNER);
+
+       Name name;
+       ClientId owner;
+
+       // actual test - random lookup
+       Perf perf("getRow", ITERATIONS);
+       unsigned seed = 0;
+
+       for (unsigned t = 0; t < ITERATIONS; t++) {
+               int name_idx = rand_r(&seed) % NAMES;
+               generate_name(name_idx, name);
+               generate_owner(name_idx / NAMES_PER_OWNER, owner);
+
+               read_row_expect_success(name, owner);
+       }
+}
+
+BOOST_AUTO_TEST_CASE(DBperfAddPermissions)
+{
+       constexpr unsigned ITERATIONS = 200;
+
+       // prepare data
+       generate_db(ITERATIONS, NAMES_PER_OWNER);
+
+       // actual test - add access rights
+       Perf perf("setPermission");
+       perf.setIterations(add_full_access_rights(ITERATIONS, NAMES_PER_OWNER));
+}
+
+BOOST_AUTO_TEST_CASE(DBperfAliasRemovalWithFullPermissions)
+{
+       // prepare data
+       generate_db(NAMES, NAMES_PER_OWNER);
+       add_full_access_rights(NAMES, NAMES_PER_OWNER);
+
+       // actual test - random lookup
+       Name name;
+       ClientId owner;
+       {
+               Perf perf("deleteRow", NAMES);
+
+               for (unsigned t = 0; t < NAMES; t++) {
+                       generate_name(t, name);
+                       generate_owner(t / NAMES_PER_OWNER, owner);
+
+                       BOOST_REQUIRE_NO_THROW(m_db.deleteRow(name, owner));
+               }
+       }
+
+       // verify everything has been removed
+       for (unsigned l = 0; l < OWNERS; l++) {
+               generate_owner(l, owner);
+               OwnerNameVector expect_no_data;
+               BOOST_REQUIRE_NO_THROW(m_db.listNames(owner, expect_no_data,
+                                                                                         DataType::BINARY_DATA));
+               BOOST_REQUIRE(0 == expect_no_data.size());
+       }
+}
+
+BOOST_AUTO_TEST_CASE(DBperfGetAliasList)
+{
+       constexpr unsigned ITERATIONS = 1000;
+
+       // prepare data
+       generate_db(NAMES, NAMES_PER_OWNER);
+       add_full_access_rights(NAMES, NAMES_PER_OWNER);
+
+       ClientId owner;
+       unsigned seed = 0;
+
+       // actual test - random lookup
+       Perf perf("listNames", ITERATIONS);
+
+       for (unsigned t = 0; t < ITERATIONS; t++) {
+               OwnerNameVector ret_list;
+               generate_owner(rand_r(&seed) % OWNERS, owner);
+
+               BOOST_REQUIRE_NO_THROW(m_db.listNames(owner, ret_list, DataType::BINARY_DATA));
+               BOOST_REQUIRE(NAMES == ret_list.size());
+               ret_list.clear();
+       }
+}
+BOOST_AUTO_TEST_SUITE_END()
index 5ec0938..d69de9e 100644 (file)
@@ -391,6 +391,7 @@ fi
 %{bin_dir}/ckm_db_tool
 %{bin_dir}/ckm_db_merge
 %{bin_dir}/ckm_generate_db
+%{bin_dir}/ckm_db_perf
 %misc_dir
 
 #################### ! %{coverage_only} #######################################
index 087717f..8478846 100644 (file)
@@ -67,14 +67,14 @@ LINK_DIRECTORIES(${KEY_MANAGER_DEP_LIBRARY_DIRS})
 
 SET(UNIT_TESTS_SOURCES
     ${PROJECT_SOURCE_DIR}/common/colour_log_formatter.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/DBFixture.cpp
+    ${PROJECT_SOURCE_DIR}/common/DBFixture.cpp
+    ${PROJECT_SOURCE_DIR}/common/test_common.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_async-observer.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_base64.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_binary-queue.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_certificate.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_comm-manager.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/test_common.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_crypto-logic.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_data-type.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/test_db_crypto.cpp
index 2fb5182..b73e762 100644 (file)
  * @brief
  */
 #include <boost_macros_wrapper.h>
-#include <unistd.h>
-#include <db-crypto.h>
-#include <iostream>
 #include <ckm/ckm-type.h>
-#include <ckm/ckm-error.h>
-#include <errno.h>
 #include <test_common.h>
 #include <DBFixture.h>
 
 using namespace CKM;
 
 namespace {
-const int restricted_local = 1;
-const int restricted_global = 0;
-
-const unsigned int c_test_retries = 1000;
-const unsigned int c_num_names = 500;
-const unsigned int c_num_names_add_test = 5000;
-const unsigned int c_names_per_owner = 15;
 
 void addRow(DB::RowVector& rows, DataType::Type type)
 {
@@ -390,144 +378,6 @@ NEGATIVE_TEST_CASE(DBtestCryptoNotDatabaseCurrent)
 BOOST_AUTO_TEST_SUITE_END()
 
 
-BOOST_FIXTURE_TEST_SUITE(DBCRYPTO_PERF_TEST, DBFixture)
-
-POSITIVE_TEST_CASE(DBperfAddNames)
-{
-       // actual test
-       performance_start("saveRow");
-
-       {
-               generate_perf_DB(c_num_names_add_test, c_names_per_owner);
-       }
-
-       performance_stop(c_num_names_add_test);
-}
-
-POSITIVE_TEST_CASE(DBperfLookupAliasByOwner)
-{
-       // prepare data
-       generate_perf_DB(c_num_names, c_names_per_owner);
-
-       unsigned int num_owners = c_num_names / c_names_per_owner;
-       Name name;
-       ClientId owner;
-
-       // actual test - successful lookup
-       performance_start("getRow");
-
-       for (unsigned int t = 0; t < c_test_retries; t++) {
-               int owner_num = rand_r(&t) % num_owners;
-               generate_owner(owner_num, owner);
-
-               unsigned int start_name = owner_num * c_names_per_owner;
-
-               for (unsigned int name_num = start_name;
-                               name_num < (start_name + c_names_per_owner); name_num++) {
-                       generate_name(name_num, name);
-                       read_row_expect_success(name, owner);
-               }
-       }
-
-       performance_stop(c_test_retries * c_num_names);
-}
-
-// TODO this test makes no sense. Rewrite it.
-POSITIVE_TEST_CASE(DBperfLookupAliasRandomOwnershipNoPermissions)
-{
-       // prepare data
-       generate_perf_DB(c_num_names, c_names_per_owner);
-
-       Name name;
-       ClientId owner;
-       //ClientId smack_label;
-       //unsigned int num_owners = c_num_names / c_names_per_owner;
-
-       // actual test - random lookup
-       performance_start("getRow");
-
-       for (unsigned int t = 0; t < c_test_retries; t++) {
-               int name_idx = rand_r(&t) % c_num_names;
-               generate_name(name_idx, name);
-               generate_owner(name_idx / c_names_per_owner, owner);
-               //generate_owner(rand_r(&t) % num_owners, smack_label);
-
-               // do not care of result
-               m_db.getRow(name, owner, DataType::BINARY_DATA);
-       }
-
-       performance_stop(c_test_retries * c_num_names);
-}
-
-POSITIVE_TEST_CASE(DBperfAddPermissions)
-{
-       // prepare data
-       generate_perf_DB(c_num_names, c_names_per_owner);
-
-       // actual test - add access rights
-       performance_start("setPermission");
-       long iterations = add_full_access_rights(c_num_names, c_names_per_owner);
-       performance_stop(iterations);
-}
-
-POSITIVE_TEST_CASE(DBperfAliasRemoval)
-{
-       // prepare data
-       generate_perf_DB(c_num_names, c_names_per_owner);
-       add_full_access_rights(c_num_names, c_names_per_owner);
-
-       // actual test - random lookup
-       performance_start("deleteRow");
-       Name name;
-       ClientId owner;
-
-       for (unsigned int t = 0; t < c_num_names; t++) {
-               generate_name(t, name);
-               generate_owner(t / c_names_per_owner, owner);
-
-               BOOST_REQUIRE_NO_THROW(m_db.deleteRow(name, owner));
-       }
-
-       performance_stop(c_num_names);
-
-       // verify everything has been removed
-       unsigned int num_owners = c_num_names / c_names_per_owner;
-
-       for (unsigned int l = 0; l < num_owners; l++) {
-               generate_owner(l, owner);
-               OwnerNameVector expect_no_data;
-               BOOST_REQUIRE_NO_THROW(m_db.listNames(owner, expect_no_data,
-                                                                                         DataType::BINARY_DATA));
-               BOOST_REQUIRE(0 == expect_no_data.size());
-       }
-}
-
-POSITIVE_TEST_CASE(DBperfGetAliasList)
-{
-       // prepare data
-       generate_perf_DB(c_num_names, c_names_per_owner);
-       add_full_access_rights(c_num_names, c_names_per_owner);
-
-       unsigned int num_owners = c_num_names / c_names_per_owner;
-       ClientId owner;
-
-       // actual test - random lookup
-       performance_start("listNames");
-
-       for (unsigned int t = 0; t < (c_test_retries / num_owners); t++) {
-               OwnerNameVector ret_list;
-               generate_owner(rand_r(&t) % num_owners, owner);
-
-               BOOST_REQUIRE_NO_THROW(m_db.listNames(owner, ret_list, DataType::BINARY_DATA));
-               BOOST_REQUIRE(c_num_names == ret_list.size());
-               ret_list.clear();
-       }
-
-       performance_stop(c_test_retries / num_owners);
-}
-BOOST_AUTO_TEST_SUITE_END()
-
-
 BOOST_AUTO_TEST_SUITE(DBCRYPTO_MIGRATION_TEST)
 namespace {
 const unsigned migration_names = 16107;
@@ -641,7 +491,7 @@ POSITIVE_TEST_CASE(DBMigrationDBCurrent)
        currentDB.generate_owner(migration_reference_owner_idx, reference_owner);
 
        {
-               currentDB.generate_perf_DB(migration_names, migration_names / migration_owners);
+               currentDB.generate_db(migration_names, migration_names / migration_owners);
 
                // only the reference owner has access to the other owners' elements <migration_accessed_element_idx>
                for (unsigned int l = 0; l < migration_owners; l++) {