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

Function graph_cluster_stats_cb_t

dpdk/app/test/test_graph.c:940–969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938}
939
940static int
941graph_cluster_stats_cb_t(bool is_first, bool is_last, void *cookie,
942 const struct rte_graph_cluster_node_stats *st)
943{
944 int i;
945
946 RTE_SET_USED(is_first);
947 RTE_SET_USED(is_last);
948 RTE_SET_USED(cookie);
949
950 for (i = 0; i < MAX_NODES + 1; i++) {
951 rte_node_t id = rte_node_from_name(node_patterns[i]);
952 if (id == st->id) {
953 if (obj_stats[i] != st->objs) {
954 printf("Obj count miss match for node = %s expected = %"PRId64", got=%"PRId64"\n",
955 node_patterns[i], obj_stats[i],
956 st->objs);
957 return -1;
958 }
959
960 if (fn_calls[i] != st->calls) {
961 printf("Func call miss match for node = %s expected = %"PRId64", got = %"PRId64"\n",
962 node_patterns[i], fn_calls[i],
963 st->calls);
964 return -1;
965 }
966 }
967 }
968 return 0;
969}
970
971static int
972test_print_stats(void)

Callers

nothing calls this directly

Calls 2

rte_node_from_nameFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected