| 938 | } |
| 939 | |
| 940 | static int |
| 941 | graph_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 | |
| 971 | static int |
| 972 | test_print_stats(void) |
nothing calls this directly
no test coverage detected