diff --git a/lib/src/phy/sync/test/ssb_measure_test.c b/lib/src/phy/sync/test/ssb_measure_test.c index a1dfe34b7..9f87da361 100644 --- a/lib/src/phy/sync/test/ssb_measure_test.c +++ b/lib/src/phy/sync/test/ssb_measure_test.c @@ -91,6 +91,7 @@ static int assert_measure(const srsran_csi_trs_measurements_t* meas) static int test_case_1(srsran_ssb_t* ssb) { // For benchmarking purposes + uint64_t t_add_usec = 0; uint64_t t_find_usec = 0; uint64_t t_meas_usec = 0; @@ -115,7 +116,11 @@ static int test_case_1(srsran_ssb_t* ssb) srsran_vec_cf_zero(buffer, sf_len); // Add the SSB base-band + gettimeofday(&t[1], NULL); TESTASSERT(srsran_ssb_add(ssb, pci, &pbch_msg, buffer, buffer) == SRSRAN_SUCCESS); + gettimeofday(&t[2], NULL); + get_time_interval(t); + t_add_usec += t[0].tv_usec + t[0].tv_sec * 1000000UL; // Run channel run_channel(); @@ -152,7 +157,8 @@ static int test_case_1(srsran_ssb_t* ssb) TESTASSERT(assert_measure(&meas) == SRSRAN_SUCCESS); } - INFO("test_case_1 - %.1f usec/search; Max srate %.1f MSps; %.1f usec/measurement", + INFO("test_case_1 - %.1f usec/encode; %.1f usec/search; Max srate %.1f MSps; %.1f usec/measurement", + (double)t_add_usec / (double)SRSRAN_NOF_NID_NR, (double)t_find_usec / (double)SRSRAN_NOF_NID_NR, (double)sf_len * (double)SRSRAN_NOF_NID_NR / (double)t_find_usec, (double)t_meas_usec / (double)SRSRAN_NOF_NID_NR);