cfs/test/fsproc/fsTest_KPLm.cc
// must break one c-thread
must break one c-thread
must break one c - thread
TEST(LB_PLAN, c6) {
  KPLoadManager::ExprDecomposeLBPolicy policy;
  policy.lb_params.kCongestQlenThr = 1.2;
  int num_worker = 4;
  std::vector<float> recv_noshare_qlen_vec = {2.4, 1.1, 1, 1};
  std::vector<float> cpu_ut_vec = {0.9, 0.5, 0.2, 0.15};
  pid_tid_ut_vec_t per_tau_ut(num_worker);
  per_tau_ut[0] = {
      {9000, {{1, std::make_pair(0.7, 0)}, {4, std::make_pair(0.1, 0)}}},
  };
  per_tau_ut[1] = {
      {9001, {{1, std::make_pair(0.2, 0)}, {2, std::make_pair(0.2, 0)}}},
  };
  per_tau_ut[2] = {
      {9002, {{1, std::make_pair(0.18, 0)}}},
  };
  per_tau_ut[3] = {
      {9003, {{1, std::make_pair(0.1, 0)}}},
  };
  auto lb_plan = TestFormLbPlanCommon(policy, num_worker, recv_noshare_qlen_vec,
                                      cpu_ut_vec, per_tau_ut);
  ASSERT_NE(lb_plan, nullptr);
  lb_plan->Print(std::cout);
  ASSERT_EQ(lb_plan->src_cid, 0);
  ASSERT_EQ(lb_plan->dst_core_map.size(), 2);
  ASSERT_EQ(lb_plan->dst_core_map[3].size(), 1);
  ASSERT_EQ(lb_plan->dst_core_map[2].size(), 1);
  delete lb_plan;
}
TEST ( LB_PLAN , c6 ) { KPLoadManager :: ExprDecomposeLBPolicy policy ; policy . lb_params . kCongestQlenThr = 1.2 ; int num_worker = 4 ; std :: vector < float > recv_noshare_qlen_vec = { 2.4 , 1.1 , 1 , 1 } ; std :: vector < float > cpu_ut_vec = { 0.9 , 0.5 , 0.2 , 0.15 } ; pid_tid_ut_vec_t per_tau_ut ( num_worker ) ; per_tau_ut [ 0 ] = { { 9000 , { { 1 , std :: make_pair ( 0.7 , 0 ) } , { 4 , std :: make_pair ( 0.1 , 0 ) } } } , } ; per_tau_ut [ 1 ] = { { 9001 , { { 1 , std :: make_pair ( 0.2 , 0 ) } , { 2 , std :: make_pair ( 0.2 , 0 ) } } } , } ; per_tau_ut [ 2 ] = { { 9002 , { { 1 , std :: make_pair ( 0.18 , 0 ) } } } , } ; per_tau_ut [ 3 ] = { { 9003 , { { 1 , std :: make_pair ( 0.1 , 0 ) } } } , } ; auto lb_plan = TestFormLbPlanCommon ( policy , num_worker , recv_noshare_qlen_vec , cpu_ut_vec , per_tau_ut ) ; ASSERT_NE ( lb_plan , nullptr ) ; lb_plan -> Print ( std :: cout ) ; ASSERT_EQ ( lb_plan -> src_cid , 0 ) ; ASSERT_EQ ( lb_plan -> dst_core_map . size ( ) , 2 ) ; ASSERT_EQ ( lb_plan -> dst_core_map [ 3 ] . size ( ) , 1 ) ; ASSERT_EQ ( lb_plan -> dst_core_map [ 2 ] . size ( ) , 1 ) ; delete lb_plan ; }
must break one c-thread
must break one c - thread