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

Function measure_performance

dpdk/app/test/test_ipsec_perf.c:507–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507static int
508measure_performance(struct ipsec_sa *sa_out, struct ipsec_sa *sa_in)
509{
510 uint64_t time_diff = 0;
511 uint64_t begin = 0;
512 uint64_t hz = rte_get_timer_hz();
513
514 begin = rte_get_timer_cycles();
515
516 do {
517 if (create_traffic(sa_out, ring_inb_prepare, ring_inb_process,
518 ring_outb_prepare) < 0)
519 return TEST_FAILED;
520
521 if (create_traffic(sa_in, ring_outb_prepare, ring_outb_process,
522 ring_inb_prepare) < 0)
523 return TEST_FAILED;
524
525 time_diff = rte_get_timer_cycles() - begin;
526
527 } while (time_diff < (hz * 10));
528
529 return TEST_SUCCESS;
530}
531
532static void
533print_metrics(const struct ipsec_test_cfg *test_cfg,

Callers 1

test_libipsec_perfFunction · 0.85

Calls 1

create_trafficFunction · 0.85

Tested by

no test coverage detected