Commit 340b3e82 authored by Anta Huang's avatar Anta Huang

add some prints and stats for X2

parent c97f6762
...@@ -1973,11 +1973,11 @@ rrc_ue_decode_dcch( ...@@ -1973,11 +1973,11 @@ rrc_ue_decode_dcch(
//double t_x2_src_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb.p_time/get_cpu_freq_GHz()/1000.0; //double t_x2_src_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb.p_time/get_cpu_freq_GHz()/1000.0;
double t_x2_src_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms; double t_x2_src_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms;
push_front(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_list, t_x2_src_enb); push_front(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_list, t_x2_src_enb);
LOG_D(RRC,"Stop-Time-debug: %d/%lf/%d/%d\n", ctxt_pP->frame*10+ctxt_pP->subframe, (double) UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms,ctxt_pP->frame,ctxt_pP->subframe); LOG_D(RRC,"UE-Stop-Time-debug: %d/%lf/%d/%d\n", ctxt_pP->frame*10+ctxt_pP->subframe, (double) UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms,ctxt_pP->frame,ctxt_pP->subframe);
// Start to measure (delay to the UE-->target) // Start to measure (delay to the UE-->target)
//start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb); //start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe; UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe;
LOG_D(RRC,"Start-Time-debug: %lf/%d/%d\n", (double) UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms,ctxt_pP->frame,ctxt_pP->subframe); LOG_D(RRC,"UE-Start-Time-debug: %lf/%d/%d\n", (double) UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms,ctxt_pP->frame,ctxt_pP->subframe);
init_meas_timers(ctxt_pP); // Initialize handover measurement timers init_meas_timers(ctxt_pP); // Initialize handover measurement timers
rrc_ue_generate_RRCConnectionReconfigurationComplete( rrc_ue_generate_RRCConnectionReconfigurationComplete(
...@@ -3704,7 +3704,7 @@ void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, con ...@@ -3704,7 +3704,7 @@ void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, con
// Start to measure (delay to the UE-->source) // Start to measure (delay to the UE-->source)
//start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb); //start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe; UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe;
LOG_D(RRC,"Start-Time-debug: %lf/%d/%d\n", (double) UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms,ctxt_pP->frame,ctxt_pP->subframe); LOG_D(RRC,"UE-Start-Time-debug: %lf/%d/%d\n", (double) UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms,ctxt_pP->frame,ctxt_pP->subframe);
} }
rrc_ue_generate_MeasurementReport( rrc_ue_generate_MeasurementReport(
ctxt_pP, ctxt_pP,
......
...@@ -415,8 +415,8 @@ rrc_top_cleanup( ...@@ -415,8 +415,8 @@ rrc_top_cleanup(
LOG_I(RRC,"[DST]%lf;%lf;%lf;%lf;%lf;%lf\n",x2_target_median,x2_target_q1,x2_target_q3,x2_target_min,x2_target_max,x2_target_avg); LOG_I(RRC,"[DST]%lf;%lf;%lf;%lf;%lf;%lf\n",x2_target_median,x2_target_q1,x2_target_q3,x2_target_min,x2_target_max,x2_target_avg);
} }
/*LOG_I(RRC,"[X2]median;q1;q3;min;max;\n"); LOG_I(RRC,"[X2]median;q1;q3;min;max;\n");
for (module_id = 0; module_id < NB_eNB_INST; module_id++) { for (module_id = 0; module_id < NB_UE_INST; module_id++) {
double x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size]; double x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size];
totable(x2_table, &eNB_rrc_inst[module_id].rrc_enb_x2_list); totable(x2_table, &eNB_rrc_inst[module_id].rrc_enb_x2_list);
qsort (x2_table, eNB_rrc_inst[module_id].rrc_enb_x2_list.size, sizeof(double), &compare); qsort (x2_table, eNB_rrc_inst[module_id].rrc_enb_x2_list.size, sizeof(double), &compare);
...@@ -427,7 +427,7 @@ rrc_top_cleanup( ...@@ -427,7 +427,7 @@ rrc_top_cleanup(
double x2_min = x2_table[0]; // MIN double x2_min = x2_table[0]; // MIN
double x2_max = x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size-1]; // mAX double x2_max = x2_table[eNB_rrc_inst[module_id].rrc_enb_x2_list.size-1]; // mAX
LOG_I(RRC,"[X2]%lf;%lf;%lf;%d;%d;\n",x2_median,x2_q1,x2_q3,x2_min,x2_max); LOG_I(RRC,"[X2]%lf;%lf;%lf;%d;%d;\n",x2_median,x2_q1,x2_q3,x2_min,x2_max);
}*/ }
if (NB_UE_INST > 0) { if (NB_UE_INST > 0) {
free (UE_rrc_inst); free (UE_rrc_inst);
......
...@@ -2142,7 +2142,8 @@ check_handovers( ...@@ -2142,7 +2142,8 @@ check_handovers(
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg); itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
// Stop to measure (x2 delay) // Stop to measure (x2 delay)
double t_x2_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - eNB_rrc_inst[ue_context_p->ue_context.handover_info->modid_s].rrc_enb_x2_ms; double t_x2_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - eNB_rrc_inst[ue_context_p->ue_context.handover_info->modid_s].rrc_enb_x2_ms;
push_front(&eNB_rrc_inst[ctxt_pP->module_id].rrc_enb_x2_list, t_x2_enb); push_front(&eNB_rrc_inst[0].rrc_enb_x2_list, t_x2_enb);
LOG_D(RRC,"eNB-Stop-Time-debug: %d/%lf/%d/%d\n", ctxt_pP->frame*10+ctxt_pP->subframe, (double) eNB_rrc_inst[ue_context_p->ue_context.handover_info->modid_s].rrc_enb_x2_ms,ctxt_pP->frame,ctxt_pP->subframe);
} }
...@@ -4253,6 +4254,7 @@ rrc_eNB_decode_dcch( ...@@ -4253,6 +4254,7 @@ rrc_eNB_decode_dcch(
sdu_sizeP); sdu_sizeP);
// Start to measure (x2 delay) // Start to measure (x2 delay)
eNB_rrc_inst[ctxt_pP->module_id].rrc_enb_x2_ms = ctxt_pP->frame*10+ctxt_pP->subframe; eNB_rrc_inst[ctxt_pP->module_id].rrc_enb_x2_ms = ctxt_pP->frame*10+ctxt_pP->subframe;
LOG_D(RRC,"eNB-Start-Time-debug: %lf/%d/%d\n", (double) eNB_rrc_inst[ctxt_pP->module_id].rrc_enb_x2_ms,ctxt_pP->frame,ctxt_pP->subframe);
rrc_eNB_process_MeasurementReport( rrc_eNB_process_MeasurementReport(
ctxt_pP, ctxt_pP,
ue_context_p, ue_context_p,
...@@ -4304,7 +4306,7 @@ rrc_eNB_decode_dcch( ...@@ -4304,7 +4306,7 @@ rrc_eNB_decode_dcch(
//double t_x2_target_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb.p_time/get_cpu_freq_GHz()/1000.0; //double t_x2_target_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb.p_time/get_cpu_freq_GHz()/1000.0;
double t_x2_target_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[0].rrc_ue_x2_target_enb_ms; double t_x2_target_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[0].rrc_ue_x2_target_enb_ms;
push_front(&UE_rrc_inst[0].rrc_ue_x2_target_enb_list, t_x2_target_enb); push_front(&UE_rrc_inst[0].rrc_ue_x2_target_enb_list, t_x2_target_enb);
LOG_D(RRC,"Stop-Time-debug: %d/%lf/%d/%d\n", ctxt_pP->frame*10+ctxt_pP->subframe, (double) UE_rrc_inst[0].rrc_ue_x2_target_enb_ms,ctxt_pP->frame,ctxt_pP->subframe); LOG_D(RRC,"UE-Stop-Time-debug: %d/%lf/%d/%d\n", ctxt_pP->frame*10+ctxt_pP->subframe, (double) UE_rrc_inst[0].rrc_ue_x2_target_enb_ms,ctxt_pP->frame,ctxt_pP->subframe);
} }
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.Status = RRC_RECONFIGURED;
LOG_I(RRC, LOG_I(RRC,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment