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

Function timed_deletes

dpdk/app/test/test_member_perf.c:558–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558static int
559timed_deletes(struct member_perf_params *params, int type)
560{
561 unsigned int i;
562 int32_t ret;
563
564 if (type == VBF)
565 return 0;
566 const uint64_t start_tsc = rte_rdtsc();
567 for (i = 0; i < KEYS_TO_ADD; i++) {
568 ret = rte_member_delete(params->setsum[type], &keys[i],
569 data[type][i]);
570 if (type != CACHE && ret < 0) {
571 printf("delete error\n");
572 return -1;
573 }
574 }
575
576 const uint64_t end_tsc = rte_rdtsc();
577 const uint64_t time_taken = end_tsc - start_tsc;
578
579 cycles[type][params->cycle][DELETE] = time_taken / KEYS_TO_ADD;
580
581 return 0;
582}
583
584static int
585timed_miss_lookup(struct member_perf_params *params, int type)

Callers 1

run_all_tbl_perf_testsFunction · 0.70

Calls 3

rte_member_deleteFunction · 0.85
rte_rdtscFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected