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

Function test_print_stats

dpdk/app/test/test_graph.c:971–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

969}
970
971static int
972test_print_stats(void)
973{
974 struct rte_graph_cluster_stats_param s_param;
975 struct rte_graph_cluster_stats *stats;
976 const char *pattern = "worker0";
977
978 if (!rte_graph_has_stats_feature())
979 return 0;
980
981 /* Prepare stats object */
982 memset(&s_param, 0, sizeof(s_param));
983 s_param.f = stdout;
984 s_param.socket_id = SOCKET_ID_ANY;
985 s_param.graph_patterns = &pattern;
986 s_param.nb_graph_patterns = 1;
987 s_param.fn = graph_cluster_stats_cb_t;
988
989 stats = rte_graph_cluster_stats_create(&s_param);
990 if (stats == NULL) {
991 printf("Unable to get stats\n");
992 return -1;
993 }
994 /* Clear screen and move to top left */
995 rte_graph_cluster_stats_get(stats, 0);
996 rte_graph_cluster_stats_destroy(stats);
997
998 return 0;
999}
1000
1001static int
1002graph_setup(void)

Callers

nothing calls this directly

Calls 6

memsetFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected