-
Notifications
You must be signed in to change notification settings - Fork 18
Developer's Guide
Update ci/install_deps.sh
, test/catch_config.h
, and adapter/test/catch_config.h
.
See this pull request for an example.
Update test/CMakeLists.txt
with your new .cc test code name.
For example, if you add trait_order.cc
, add trait_order
as follows:
set(API_TESTS dpe_optimization_test dpe_random_test
dpe_roundrobin_test end_to_end_test vbucket_test trait_order)
First, make sure that you build testing codes with Debug option.
cmake .. -DCMAKE_BUILD_TYPE=Debug
Insert LOG(INFO) << "debug message for var=" << var;
or use std::cerr << "temporary debug message" <<std::endl;
.
Then, run a specific test to debug.
ctest --verbose -I 13,13
- Create a new directory under the
adapter
directory.
Data Placement Engine (DPE) is the heart of Hermes performance. Developers may want to replace the default engine using different optimization algorithms.
You can quickly check how DPE is tested.
This is the code that you need to modify.
If you look at the line 206 Status result;
in MinimizeIoTimePlacement(), the default value of result is always HERMES_SUCCESS
as defined in src/hermes_status.h.
The goal is to assemble placement schema for BLOBs.
for (size_t i {0}; i < num_blobs; ++i) {
PlacementSchema schema;
// schema will have results from your problem solver.
output.push_back(schema);
}
The -1
is for Placement Ratio constraint, which iterates 1 less than num_targets
.
const size_t total_constraints =
num_blobs + (num_targets * constraints_per_target) - 1;
- Replace the header file
#include "ortools/linear_solver/linear_solver.h"
. - Update CMakeLists.txt files to remove gortools dependendency.