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

Function test_empty_pop

dpdk/app/test/test_stack_perf.c:109–125  ·  view source on GitHub ↗

Measure the cycle cost of popping an empty stack. */

Source from the content-addressed store, hash-verified

107
108/* Measure the cycle cost of popping an empty stack. */
109static void
110test_empty_pop(struct rte_stack *s)
111{
112 unsigned int iterations = 100000000;
113 void *objs[MAX_BURST];
114 unsigned int i;
115
116 uint64_t start = rte_rdtsc();
117
118 for (i = 0; i < iterations; i++)
119 rte_stack_pop(s, objs, bulk_sizes[0]);
120
121 uint64_t end = rte_rdtsc();
122
123 printf("Stack empty pop: %.2F\n",
124 (double)(end - start) / iterations);
125}
126
127struct thread_args {
128 struct rte_stack *s;

Callers 1

__test_stack_perfFunction · 0.85

Calls 3

rte_stack_popFunction · 0.85
rte_rdtscFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected