MCPcopy Create free account
hub / github.com/F-Stack/f-stack / timed_adds

Function timed_adds

dpdk/app/test/test_efd_perf.c:177–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177static int
178timed_adds(struct efd_perf_params *params)
179{
180 const uint64_t start_tsc = rte_rdtsc();
181 unsigned int i, a;
182 int32_t ret;
183
184 for (i = 0; i < KEYS_TO_ADD; i++) {
185 ret = rte_efd_update(params->efd_table, test_socket_id, keys[i],
186 data[i]);
187 if (ret != 0) {
188 printf("Error %d in rte_efd_update - key=0x", ret);
189 for (a = 0; a < params->key_size; a++)
190 printf("%02x", keys[i][a]);
191 printf(" value=%d\n", data[i]);
192
193 return -1;
194 }
195 }
196
197 const uint64_t end_tsc = rte_rdtsc();
198 const uint64_t time_taken = end_tsc - start_tsc;
199
200 cycles[params->cycle][ADD] = time_taken / KEYS_TO_ADD;
201 return 0;
202}
203
204static int
205timed_lookups(struct efd_perf_params *params)

Callers 1

run_all_tbl_perf_testsFunction · 0.70

Calls 3

rte_efd_updateFunction · 0.85
rte_rdtscFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected