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

Function graph_stats_print

dpdk/app/graph/graph.c:353–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353void
354graph_stats_print(void)
355{
356 const char topLeft[] = {27, '[', '1', ';', '1', 'H', '\0'};
357 const char clr[] = {27, '[', '2', 'J', '\0'};
358 struct rte_graph_cluster_stats_param s_param;
359 struct rte_graph_cluster_stats *stats;
360 const char *pattern = "worker_*";
361
362 /* Prepare stats object */
363 memset(&s_param, 0, sizeof(s_param));
364 s_param.f = stdout;
365 s_param.socket_id = SOCKET_ID_ANY;
366 s_param.graph_patterns = &pattern;
367 s_param.nb_graph_patterns = 1;
368
369 stats = rte_graph_cluster_stats_create(&s_param);
370 if (stats == NULL)
371 rte_exit(EXIT_FAILURE, "Unable to create stats object\n");
372
373 while (!force_quit) {
374 /* Clear screen and move to top left */
375 printf("%s%s", clr, topLeft);
376 rte_graph_cluster_stats_get(stats, 0);
377 rte_delay_ms(1E3);
378 if (app_graph_exit())
379 force_quit = true;
380 }
381
382 rte_graph_cluster_stats_destroy(stats);
383}
384
385uint64_t
386graph_coremask_get(void)

Callers 1

l3fwd_pattern_configureFunction · 0.85

Calls 8

memsetFunction · 0.85
rte_exitFunction · 0.85
rte_delay_msFunction · 0.85
app_graph_exitFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected