- static int only_once;
- uint64_t etot, eavg, emax, emin;
- uint64_t dtot, davg, dmax, dmin;
- uint64_t ctot, cavg, cmax, cmin;
- double ttot, tavg, tmax, tmin;
-
- const uint64_t tunit = 1000000; /* us */
- const uint64_t tsc_hz = rte_get_tsc_hz();
-
- etot = ctx->results.enqd_tot;
- eavg = ctx->results.enqd_tot / ctx->results.burst_num;
- emax = ctx->results.enqd_max;
- emin = ctx->results.enqd_min;
-
- dtot = ctx->results.deqd_tot;
- davg = ctx->results.deqd_tot / ctx->results.burst_num;
- dmax = ctx->results.deqd_max;
- dmin = ctx->results.deqd_min;
-
- ctot = ctx->results.cycles_tot;
- cavg = ctx->results.cycles_tot / ctx->results.num;
- cmax = ctx->results.cycles_max;
- cmin = ctx->results.cycles_min;
-
- ttot = tunit*(double)(ctot) / tsc_hz;
- tavg = tunit*(double)(cavg) / tsc_hz;
- tmax = tunit*(double)(cmax) / tsc_hz;
- tmin = tunit*(double)(cmin) / tsc_hz;
-
- if (ctx->options->csv) {
- if (!only_once)
- printf("\n# lcore, Pakt Seq #, Packet Size, cycles,"
- " time (us)");
-
- for (i = 0; i < ctx->options->total_ops; i++) {
-
- printf("\n%u;%"PRIu64";%"PRIu64";%.3f",
- ctx->lcore_id, i + 1,
- ctx->res[i].tsc_end - ctx->res[i].tsc_start,
- tunit * (double) (ctx->res[i].tsc_end
- - ctx->res[i].tsc_start)
- / tsc_hz);