1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
9 #include <rte_common.h>
10 #include <rte_cycles.h>
11 #include <rte_errno.h>
12 #include <rte_graph.h>
13 #include <rte_graph_worker.h>
14 #include <rte_lcore.h>
15 #include <rte_malloc.h>
20 #define TEST_GRAPH_PERF_MZ "graph_perf_data"
21 #define TEST_GRAPH_SRC_NAME "test_graph_perf_source"
22 #define TEST_GRAPH_SRC_BRST_ONE_NAME "test_graph_perf_source_one"
23 #define TEST_GRAPH_WRK_NAME "test_graph_perf_worker"
24 #define TEST_GRAPH_SNK_NAME "test_graph_perf_sink"
26 #define SOURCES(map) RTE_DIM(map)
27 #define STAGES(map) RTE_DIM(map)
28 #define NODES_PER_STAGE(map) RTE_DIM(map[0])
29 #define SINKS(map) RTE_DIM(map[0])
31 #define MAX_EDGES_PER_NODE 7
33 struct test_node_data {
36 uint8_t next_nodes[MAX_EDGES_PER_NODE];
37 uint8_t next_percentage[MAX_EDGES_PER_NODE];
40 struct test_graph_perf {
43 struct test_node_data *node_data;
46 struct graph_lcore_data {
51 static struct test_node_data *
52 graph_get_node_data(struct test_graph_perf *graph_data, rte_node_t id)
54 struct test_node_data *node_data = NULL;
57 for (i = 0; i < graph_data->nb_nodes; i++)
58 if (graph_data->node_data[i].node_id == id) {
59 node_data = &graph_data->node_data[i];
67 test_node_ctx_init(const struct rte_graph *graph, struct rte_node *node)
69 struct test_graph_perf *graph_data;
70 struct test_node_data *node_data;
71 const struct rte_memzone *mz;
72 rte_node_t nid = node->id;
78 mz = rte_memzone_lookup(TEST_GRAPH_PERF_MZ);
81 graph_data = mz->addr;
82 node_data = graph_get_node_data(graph_data, nid);
83 node->ctx[0] = node->nb_edges;
84 for (i = 0; i < node->nb_edges && !node_data->is_sink; i++, edge++) {
85 node->ctx[i + 1] = edge;
86 node->ctx[i + 9] = node_data->next_percentage[i];
92 /* Source node function */
94 test_perf_node_worker_source(struct rte_graph *graph, struct rte_node *node,
95 void **objs, uint16_t nb_objs)
101 RTE_SET_USED(nb_objs);
103 /* Create a proportional stream for every next */
104 for (i = 0; i < node->ctx[0]; i++) {
105 count = (node->ctx[i + 9] * RTE_GRAPH_BURST_SIZE) / 100;
106 rte_node_next_stream_get(graph, node, node->ctx[i + 1], count);
107 rte_node_next_stream_put(graph, node, node->ctx[i + 1], count);
110 return RTE_GRAPH_BURST_SIZE;
113 static struct rte_node_register test_graph_perf_source = {
114 .name = TEST_GRAPH_SRC_NAME,
115 .process = test_perf_node_worker_source,
116 .flags = RTE_NODE_SOURCE_F,
117 .init = test_node_ctx_init,
120 RTE_NODE_REGISTER(test_graph_perf_source);
123 test_perf_node_worker_source_burst_one(struct rte_graph *graph,
124 struct rte_node *node, void **objs,
131 RTE_SET_USED(nb_objs);
133 /* Create a proportional stream for every next */
134 for (i = 0; i < node->ctx[0]; i++) {
135 count = (node->ctx[i + 9]) / 100;
136 rte_node_next_stream_get(graph, node, node->ctx[i + 1], count);
137 rte_node_next_stream_put(graph, node, node->ctx[i + 1], count);
143 static struct rte_node_register test_graph_perf_source_burst_one = {
144 .name = TEST_GRAPH_SRC_BRST_ONE_NAME,
145 .process = test_perf_node_worker_source_burst_one,
146 .flags = RTE_NODE_SOURCE_F,
147 .init = test_node_ctx_init,
150 RTE_NODE_REGISTER(test_graph_perf_source_burst_one);
152 /* Worker node function */
154 test_perf_node_worker(struct rte_graph *graph, struct rte_node *node,
155 void **objs, uint16_t nb_objs)
162 /* Move stream for single next node */
163 if (node->ctx[0] == 1) {
164 rte_node_next_stream_move(graph, node, node->ctx[1]);
168 /* Enqueue objects to next nodes proportionally */
169 for (i = 0; i < node->ctx[0]; i++) {
170 next = node->ctx[i + 1];
171 count = (node->ctx[i + 9] * nb_objs) / 100;
174 switch (count & (4 - 1)) {
176 rte_node_enqueue_x4(graph, node, next, objs[0],
177 objs[1], objs[2], objs[3]);
182 rte_node_enqueue_x1(graph, node, next, objs[0]);
187 rte_node_enqueue_x2(graph, node, next, objs[0],
193 rte_node_enqueue_x2(graph, node, next, objs[0],
195 rte_node_enqueue_x1(graph, node, next, objs[0]);
204 rte_node_enqueue(graph, node, next, objs, nb_objs - enq);
209 static struct rte_node_register test_graph_perf_worker = {
210 .name = TEST_GRAPH_WRK_NAME,
211 .process = test_perf_node_worker,
212 .init = test_node_ctx_init,
215 RTE_NODE_REGISTER(test_graph_perf_worker);
217 /* Last node in graph a.k.a sink node */
219 test_perf_node_sink(struct rte_graph *graph, struct rte_node *node, void **objs,
225 RTE_SET_USED(nb_objs);
230 static struct rte_node_register test_graph_perf_sink = {
231 .name = TEST_GRAPH_SNK_NAME,
232 .process = test_perf_node_sink,
233 .init = test_node_ctx_init,
236 RTE_NODE_REGISTER(test_graph_perf_sink);
239 graph_perf_setup(void)
241 if (rte_lcore_count() < 2) {
242 printf("Test requires at least 2 lcores\n");
250 graph_perf_teardown(void)
254 static inline rte_node_t
255 graph_node_get(const char *pname, char *nname)
257 rte_node_t pnode_id = rte_node_from_name(pname);
258 char lookup_name[RTE_NODE_NAMESIZE];
261 snprintf(lookup_name, RTE_NODE_NAMESIZE, "%s-%s", pname, nname);
262 node_id = rte_node_from_name(lookup_name);
264 if (node_id != RTE_NODE_ID_INVALID) {
265 if (rte_node_edge_count(node_id))
266 rte_node_edge_shrink(node_id, 0);
270 return rte_node_clone(pnode_id, nname);
274 graph_node_count_edges(uint32_t stage, uint16_t node, uint16_t nodes_per_stage,
275 uint8_t edge_map[][nodes_per_stage][nodes_per_stage],
276 char *ename[], struct test_node_data *node_data,
277 rte_node_t **node_map)
279 uint8_t total_percent = 0;
283 for (i = 0; i < nodes_per_stage && edges < MAX_EDGES_PER_NODE; i++) {
284 if (edge_map[stage + 1][i][node]) {
285 ename[edges] = malloc(sizeof(char) * RTE_NODE_NAMESIZE);
286 snprintf(ename[edges], RTE_NODE_NAMESIZE, "%s",
287 rte_node_id_to_name(node_map[stage + 1][i]));
288 node_data->next_nodes[edges] = node_map[stage + 1][i];
289 node_data->next_percentage[edges] =
290 edge_map[stage + 1][i][node];
292 total_percent += edge_map[stage + 1][i][node];
296 if (edges >= MAX_EDGES_PER_NODE || (edges && total_percent != 100)) {
297 for (i = 0; i < edges; i++)
299 return RTE_EDGE_ID_INVALID;
306 graph_init(const char *gname, uint8_t nb_srcs, uint8_t nb_sinks,
307 uint32_t stages, uint16_t nodes_per_stage,
308 uint8_t src_map[][nodes_per_stage], uint8_t snk_map[][nb_sinks],
309 uint8_t edge_map[][nodes_per_stage][nodes_per_stage],
312 struct test_graph_perf *graph_data;
313 char nname[RTE_NODE_NAMESIZE / 2];
314 struct test_node_data *node_data;
315 char *ename[nodes_per_stage];
316 struct rte_graph_param gconf;
317 const struct rte_memzone *mz;
318 uint8_t total_percent = 0;
319 rte_node_t *src_nodes;
320 rte_node_t *snk_nodes;
321 rte_node_t **node_map;
322 char **node_patterns;
323 rte_graph_t graph_id;
328 mz = rte_memzone_reserve(TEST_GRAPH_PERF_MZ,
329 sizeof(struct test_graph_perf), 0, 0);
331 printf("Failed to allocate graph common memory\n");
335 graph_data = mz->addr;
336 graph_data->nb_nodes = 0;
337 graph_data->node_data =
338 malloc(sizeof(struct test_node_data) *
339 (nb_srcs + nb_sinks + stages * nodes_per_stage));
340 if (graph_data->node_data == NULL) {
341 printf("Failed to reserve memzone for graph data\n");
345 node_patterns = malloc(sizeof(char *) *
346 (nb_srcs + nb_sinks + stages * nodes_per_stage));
347 if (node_patterns == NULL) {
348 printf("Failed to reserve memory for node patterns\n");
352 src_nodes = malloc(sizeof(rte_node_t) * nb_srcs);
353 if (src_nodes == NULL) {
354 printf("Failed to reserve memory for src nodes\n");
358 snk_nodes = malloc(sizeof(rte_node_t) * nb_sinks);
359 if (snk_nodes == NULL) {
360 printf("Failed to reserve memory for snk nodes\n");
364 node_map = malloc(sizeof(rte_node_t *) * stages +
365 sizeof(rte_node_t) * nodes_per_stage * stages);
366 if (node_map == NULL) {
367 printf("Failed to reserve memory for node map\n");
371 /* Setup the Graph */
372 for (i = 0; i < stages; i++) {
374 (rte_node_t *)(node_map + stages) + nodes_per_stage * i;
375 for (j = 0; j < nodes_per_stage; j++) {
377 for (k = 0; k < nodes_per_stage; k++)
378 total_percent += edge_map[i][j][k];
381 node_patterns[graph_data->nb_nodes] =
382 malloc(RTE_NODE_NAMESIZE);
383 if (node_patterns[graph_data->nb_nodes] == NULL) {
384 printf("Failed to create memory for pattern\n");
385 goto pattern_name_free;
388 /* Clone a worker node */
389 snprintf(nname, sizeof(nname), "%d-%d", i, j);
391 graph_node_get(TEST_GRAPH_WRK_NAME, nname);
392 if (node_map[i][j] == RTE_NODE_ID_INVALID) {
393 printf("Failed to create node[%s]\n", nname);
394 graph_data->nb_nodes++;
395 goto pattern_name_free;
397 snprintf(node_patterns[graph_data->nb_nodes],
398 RTE_NODE_NAMESIZE, "%s",
399 rte_node_id_to_name(node_map[i][j]));
401 &graph_data->node_data[graph_data->nb_nodes];
402 node_data->node_id = node_map[i][j];
403 node_data->is_sink = false;
404 graph_data->nb_nodes++;
408 for (i = 0; i < stages - 1; i++) {
409 for (j = 0; j < nodes_per_stage; j++) {
410 /* Count edges i.e connections of worker node to next */
412 graph_get_node_data(graph_data, node_map[i][j]);
413 edges = graph_node_count_edges(i, j, nodes_per_stage,
415 node_data, node_map);
416 if (edges == RTE_EDGE_ID_INVALID) {
417 printf("Invalid edge configuration\n");
418 goto pattern_name_free;
423 /* Connect a node in stage 'i' to nodes
424 * in stage 'i + 1' with edges.
426 count = rte_node_edge_update(
428 (const char **)(uintptr_t)ename, edges);
429 for (k = 0; k < edges; k++)
431 if (count != edges) {
432 printf("Couldn't add edges %d %d\n", edges,
434 goto pattern_name_free;
439 /* Setup Source nodes */
440 for (i = 0; i < nb_srcs; i++) {
443 node_patterns[graph_data->nb_nodes] = malloc(RTE_NODE_NAMESIZE);
444 if (node_patterns[graph_data->nb_nodes] == NULL) {
445 printf("Failed to create memory for pattern\n");
446 goto pattern_name_free;
448 /* Clone a source node */
449 snprintf(nname, sizeof(nname), "%d", i);
451 graph_node_get(burst_one ? TEST_GRAPH_SRC_BRST_ONE_NAME
452 : TEST_GRAPH_SRC_NAME,
454 if (src_nodes[i] == RTE_NODE_ID_INVALID) {
455 printf("Failed to create node[%s]\n", nname);
456 graph_data->nb_nodes++;
457 goto pattern_name_free;
459 snprintf(node_patterns[graph_data->nb_nodes], RTE_NODE_NAMESIZE,
460 "%s", rte_node_id_to_name(src_nodes[i]));
461 node_data = &graph_data->node_data[graph_data->nb_nodes];
462 node_data->node_id = src_nodes[i];
463 node_data->is_sink = false;
464 graph_data->nb_nodes++;
466 /* Prepare next node list to connect to */
467 for (j = 0; j < nodes_per_stage; j++) {
470 ename[edges] = malloc(sizeof(char) * RTE_NODE_NAMESIZE);
471 snprintf(ename[edges], RTE_NODE_NAMESIZE, "%s",
472 rte_node_id_to_name(node_map[0][j]));
473 node_data->next_nodes[edges] = node_map[0][j];
474 node_data->next_percentage[edges] = src_map[i][j];
476 total_percent += src_map[i][j];
481 if (edges >= MAX_EDGES_PER_NODE || total_percent != 100) {
482 printf("Invalid edge configuration\n");
483 for (j = 0; j < edges; j++)
485 goto pattern_name_free;
488 /* Connect to list of next nodes using edges */
489 count = rte_node_edge_update(src_nodes[i], 0,
490 (const char **)(uintptr_t)ename,
492 for (k = 0; k < edges; k++)
494 if (count != edges) {
495 printf("Couldn't add edges %d %d\n", edges, count);
496 goto pattern_name_free;
500 /* Setup Sink nodes */
501 for (i = 0; i < nb_sinks; i++) {
502 node_patterns[graph_data->nb_nodes] = malloc(RTE_NODE_NAMESIZE);
503 if (node_patterns[graph_data->nb_nodes] == NULL) {
504 printf("Failed to create memory for pattern\n");
505 goto pattern_name_free;
508 /* Clone a sink node */
509 snprintf(nname, sizeof(nname), "%d", i);
510 snk_nodes[i] = graph_node_get(TEST_GRAPH_SNK_NAME, nname);
511 if (snk_nodes[i] == RTE_NODE_ID_INVALID) {
512 printf("Failed to create node[%s]\n", nname);
513 graph_data->nb_nodes++;
514 goto pattern_name_free;
516 snprintf(node_patterns[graph_data->nb_nodes], RTE_NODE_NAMESIZE,
517 "%s", rte_node_id_to_name(snk_nodes[i]));
518 node_data = &graph_data->node_data[graph_data->nb_nodes];
519 node_data->node_id = snk_nodes[i];
520 node_data->is_sink = true;
521 graph_data->nb_nodes++;
524 /* Connect last stage worker nodes to sink nodes */
525 for (i = 0; i < nodes_per_stage; i++) {
528 node_data = graph_get_node_data(graph_data,
529 node_map[stages - 1][i]);
530 /* Prepare list of sink nodes to connect to */
531 for (j = 0; j < nb_sinks; j++) {
534 ename[edges] = malloc(sizeof(char) * RTE_NODE_NAMESIZE);
535 snprintf(ename[edges], RTE_NODE_NAMESIZE, "%s",
536 rte_node_id_to_name(snk_nodes[j]));
537 node_data->next_nodes[edges] = snk_nodes[j];
538 node_data->next_percentage[edges] = snk_map[i][j];
540 total_percent += snk_map[i][j];
544 if (edges >= MAX_EDGES_PER_NODE || total_percent != 100) {
545 printf("Invalid edge configuration\n");
546 for (j = 0; j < edges; j++)
548 goto pattern_name_free;
551 /* Connect a worker node to a list of sink nodes */
552 count = rte_node_edge_update(node_map[stages - 1][i], 0,
553 (const char **)(uintptr_t)ename,
555 for (k = 0; k < edges; k++)
557 if (count != edges) {
558 printf("Couldn't add edges %d %d\n", edges, count);
559 goto pattern_name_free;
564 gconf.socket_id = SOCKET_ID_ANY;
565 gconf.nb_node_patterns = graph_data->nb_nodes;
566 gconf.node_patterns = (const char **)(uintptr_t)node_patterns;
568 graph_id = rte_graph_create(gname, &gconf);
569 if (graph_id == RTE_GRAPH_ID_INVALID) {
570 printf("Graph creation failed with error = %d\n", rte_errno);
571 goto pattern_name_free;
573 graph_data->graph_id = graph_id;
576 for (i = 0; i < graph_data->nb_nodes; i++)
577 free(node_patterns[i]);
585 for (i = 0; i < graph_data->nb_nodes; i++)
586 free(node_patterns[i]);
594 free(graph_data->node_data);
596 rte_memzone_free(mz);
600 /* Worker thread function */
602 _graph_perf_wrapper(void *args)
604 struct graph_lcore_data *data = args;
605 struct rte_graph *graph;
608 graph = rte_graph_lookup(rte_graph_id_to_name(data->graph_id));
610 /* Graph walk until done */
612 rte_graph_walk(graph);
618 measure_perf_get(rte_graph_t graph_id)
620 const char *pattern = rte_graph_id_to_name(graph_id);
621 uint32_t lcore_id = rte_get_next_lcore(-1, 1, 0);
622 struct rte_graph_cluster_stats_param param;
623 struct rte_graph_cluster_stats *stats;
624 struct graph_lcore_data *data;
626 data = rte_zmalloc("Graph_perf", sizeof(struct graph_lcore_data),
627 RTE_CACHE_LINE_SIZE);
628 data->graph_id = graph_id;
631 /* Run graph worker thread function */
632 rte_eal_remote_launch(_graph_perf_wrapper, data, lcore_id);
634 /* Collect stats for few msecs */
635 if (rte_graph_has_stats_feature()) {
636 memset(¶m, 0, sizeof(param));
638 param.socket_id = SOCKET_ID_ANY;
639 param.graph_patterns = &pattern;
640 param.nb_graph_patterns = 1;
642 stats = rte_graph_cluster_stats_create(¶m);
644 printf("Failed to create stats\n");
649 rte_graph_cluster_stats_get(stats, true);
651 rte_graph_cluster_stats_get(stats, false);
652 rte_graph_cluster_stats_destroy(stats);
657 rte_eal_wait_lcore(lcore_id);
665 const struct rte_memzone *mz = rte_memzone_lookup(TEST_GRAPH_PERF_MZ);
666 struct test_graph_perf *graph_data;
670 graph_data = mz->addr;
672 rte_graph_destroy(graph_data->graph_id);
673 free(graph_data->node_data);
674 rte_memzone_free(rte_memzone_lookup(TEST_GRAPH_PERF_MZ));
680 const struct rte_memzone *mz;
681 struct test_graph_perf *graph_data;
683 mz = rte_memzone_lookup(TEST_GRAPH_PERF_MZ);
686 graph_data = mz->addr;
688 return measure_perf_get(graph_data->graph_id);
692 graph_hr_4s_1n_1src_1snk(void)
694 return measure_perf();
698 graph_hr_4s_1n_1src_1snk_brst_one(void)
700 return measure_perf();
704 graph_hr_4s_1n_2src_1snk(void)
706 return measure_perf();
710 graph_hr_4s_1n_1src_2snk(void)
712 return measure_perf();
716 graph_tree_4s_4n_1src_4snk(void)
718 return measure_perf();
722 graph_reverse_tree_3s_4n_1src_1snk(void)
724 return measure_perf();
728 graph_parallel_tree_5s_4n_4src_4snk(void)
730 return measure_perf();
742 uint8_t edge_map[][1][1] = {
748 uint8_t src_map[][1] = { {100} };
749 uint8_t snk_map[][1] = { {100} };
751 return graph_init("graph_hr", SOURCES(src_map), SINKS(snk_map),
752 STAGES(edge_map), NODES_PER_STAGE(edge_map), src_map,
753 snk_map, edge_map, 0);
763 graph_init_hr_brst_one(void)
765 uint8_t edge_map[][1][1] = {
771 uint8_t src_map[][1] = { {100} };
772 uint8_t snk_map[][1] = { {100} };
774 return graph_init("graph_hr", SOURCES(src_map), SINKS(snk_map),
775 STAGES(edge_map), NODES_PER_STAGE(edge_map), src_map,
776 snk_map, edge_map, 1);
786 graph_init_hr_multi_src(void)
788 uint8_t edge_map[][1][1] = {
794 uint8_t src_map[][1] = {
797 uint8_t snk_map[][1] = { {100} };
799 return graph_init("graph_hr", SOURCES(src_map), SINKS(snk_map),
800 STAGES(edge_map), NODES_PER_STAGE(edge_map), src_map,
801 snk_map, edge_map, 0);
811 graph_init_hr_multi_snk(void)
813 uint8_t edge_map[][1][1] = {
819 uint8_t src_map[][1] = { {100} };
820 uint8_t snk_map[][2] = { {50, 50} };
822 return graph_init("graph_hr", SOURCES(src_map), SINKS(snk_map),
823 STAGES(edge_map), NODES_PER_STAGE(edge_map), src_map,
824 snk_map, edge_map, 0);
834 graph_init_tree(void)
836 uint8_t edge_map[][4][4] = {
862 uint8_t src_map[][4] = { {100, 0, 0, 0} };
863 uint8_t snk_map[][4] = {
870 return graph_init("graph_full_split", SOURCES(src_map), SINKS(snk_map),
871 STAGES(edge_map), NODES_PER_STAGE(edge_map), src_map,
872 snk_map, edge_map, 0);
882 graph_init_reverse_tree(void)
884 uint8_t edge_map[][4][4] = {
904 uint8_t src_map[][4] = { {25, 25, 25, 25} };
905 uint8_t snk_map[][1] = { {100}, {100}, {0}, {0} };
907 return graph_init("graph_full_split", SOURCES(src_map), SINKS(snk_map),
908 STAGES(edge_map), NODES_PER_STAGE(edge_map), src_map,
909 snk_map, edge_map, 0);
919 graph_init_parallel_tree(void)
921 uint8_t edge_map[][4][4] = {
953 uint8_t src_map[][4] = {
959 uint8_t snk_map[][4] = {
966 return graph_init("graph_parallel", SOURCES(src_map), SINKS(snk_map),
967 STAGES(edge_map), NODES_PER_STAGE(edge_map), src_map,
968 snk_map, edge_map, 0);
971 /** Graph Creation cheat sheet
972 * edge_map -> dictates graph flow from worker stage 0 to worker stage n-1.
973 * src_map -> dictates source nodes enqueue percentage to worker stage 0.
974 * snk_map -> dictates stage n-1 enqueue percentage to sink.
977 * edge_map[<nb_stages>][<nodes_per_stg>][<nodes_in_nxt_stg = nodes_per_stg>]
978 * src_map[<nb_sources>][<nodes_in_stage0 = nodes_per_stage>]
979 * snk_map[<nodes_in_stage(n-1) = nodes_per_stage>][<nb_sinks>]
981 * The last array dictates the percentage of received objs to enqueue to next
984 * Note: edge_map[][0][] will always be unused as it will receive from source
988 * http://bit.ly/2PqbqOy
989 * Each stage(n) connects to all nodes in the next stage in decreasing
991 * Since we can't resize the edge_map dynamically we get away by creating
992 * dummy nodes and assigning 0 percentages.
993 * Max nodes across all stages = 4
998 * edge_map[][4][4] = {
1005 * }, // This will be unused.
1007 * // Nodes enabled in current stage + prev stage enq %
1020 * Above, each stage tells how much it should receive from previous except
1023 * src_map[][4] = { {25, 25, 25, 25} };
1024 * Here, we tell each source the % it has to send to stage_0 nodes. In
1025 * case we want 2 source node we can declare as
1026 * src_map[][4] = { {25, 25, 25, 25}, {25, 25, 25, 25} };
1028 * snk_map[][1] = { {100}, {100}, {0}, {0} }
1029 * Here, we tell stage - 1 nodes how much to enqueue to sink_0.
1030 * If we have 2 sinks we can do as follows
1031 * snk_map[][2] = { {50, 50}, {50, 50}, {0, 0}, {0, 0} }
1034 static struct unit_test_suite graph_perf_testsuite = {
1035 .suite_name = "Graph library performance test suite",
1036 .setup = graph_perf_setup,
1037 .teardown = graph_perf_teardown,
1038 .unit_test_cases = {
1039 TEST_CASE_ST(graph_init_hr, graph_fini,
1040 graph_hr_4s_1n_1src_1snk),
1041 TEST_CASE_ST(graph_init_hr_brst_one, graph_fini,
1042 graph_hr_4s_1n_1src_1snk_brst_one),
1043 TEST_CASE_ST(graph_init_hr_multi_src, graph_fini,
1044 graph_hr_4s_1n_2src_1snk),
1045 TEST_CASE_ST(graph_init_hr_multi_snk, graph_fini,
1046 graph_hr_4s_1n_1src_2snk),
1047 TEST_CASE_ST(graph_init_tree, graph_fini,
1048 graph_tree_4s_4n_1src_4snk),
1049 TEST_CASE_ST(graph_init_reverse_tree, graph_fini,
1050 graph_reverse_tree_3s_4n_1src_1snk),
1051 TEST_CASE_ST(graph_init_parallel_tree, graph_fini,
1052 graph_parallel_tree_5s_4n_4src_4snk),
1053 TEST_CASES_END(), /**< NULL terminate unit test array */
1058 test_graph_perf_func(void)
1060 return unit_test_suite_runner(&graph_perf_testsuite);
1063 REGISTER_TEST_COMMAND(graph_perf_autotest, test_graph_perf_func);