Added SSB measure test add/put/encode time measure

master
Xavier Arteaga 4 years ago committed by Andre Puschmann
parent 0aa5b14145
commit 3634e96c3e

@ -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);

Loading…
Cancel
Save