| 9037 | |
| 9038 | |
| 9039 | void get_all_node_count_stats(agent* thisAgent) |
| 9040 | { |
| 9041 | int i; |
| 9042 | |
| 9043 | // |
| 9044 | // This sanity check should no longer be neccessary. |
| 9045 | // |
| 9046 | /* --- sanity check: make sure we've got names for all the bnode types --- */ |
| 9047 | //for (i=0; i<256; i++) |
| 9048 | // if (thisAgent->rete_node_counts[i] && |
| 9049 | // (*bnode_type_names[i] == 0)) { |
| 9050 | // print (thisAgent, "Internal eror: unknown node type [%d] has nonzero count.\n",i); |
| 9051 | // } |
| 9052 | init_bnode_type_names(thisAgent); |
| 9053 | |
| 9054 | /* --- calculate the three arrays --- */ |
| 9055 | for (i = 0; i < 256; i++) |
| 9056 | { |
| 9057 | thisAgent->actual[i] = thisAgent->rete_node_counts[i]; |
| 9058 | thisAgent->if_no_merging[i] = thisAgent->rete_node_counts[i]; |
| 9059 | thisAgent->if_no_sharing[i] = thisAgent->rete_node_counts_if_no_sharing[i]; |
| 9060 | } |
| 9061 | |
| 9062 | /* --- don't want the dummy matches node to show up as a real node --- */ |
| 9063 | thisAgent->actual[DUMMY_MATCHES_BNODE] = 0; |
| 9064 | thisAgent->if_no_merging[DUMMY_MATCHES_BNODE] = 0; |
| 9065 | thisAgent->if_no_sharing[DUMMY_MATCHES_BNODE] = 0; |
| 9066 | |
| 9067 | /* --- If no merging or sharing, each MP node would be 1 Mem + 1 Pos --- */ |
| 9068 | thisAgent->if_no_merging[MEMORY_BNODE] += thisAgent->if_no_merging[MP_BNODE]; |
| 9069 | thisAgent->if_no_merging[POSITIVE_BNODE] += thisAgent->if_no_merging[MP_BNODE]; |
| 9070 | thisAgent->if_no_merging[MP_BNODE] = 0; |
| 9071 | thisAgent->if_no_merging[UNHASHED_MEMORY_BNODE] += thisAgent->if_no_merging[UNHASHED_MP_BNODE]; |
| 9072 | thisAgent->if_no_merging[UNHASHED_POSITIVE_BNODE] += thisAgent->if_no_merging[UNHASHED_MP_BNODE]; |
| 9073 | thisAgent->if_no_merging[UNHASHED_MP_BNODE] = 0; |
| 9074 | thisAgent->if_no_sharing[MEMORY_BNODE] += thisAgent->if_no_sharing[MP_BNODE]; |
| 9075 | thisAgent->if_no_sharing[POSITIVE_BNODE] += thisAgent->if_no_sharing[MP_BNODE]; |
| 9076 | thisAgent->if_no_sharing[MP_BNODE] = 0; |
| 9077 | thisAgent->if_no_sharing[UNHASHED_MEMORY_BNODE] += thisAgent->if_no_sharing[UNHASHED_MP_BNODE]; |
| 9078 | thisAgent->if_no_sharing[UNHASHED_POSITIVE_BNODE] += thisAgent->if_no_sharing[UNHASHED_MP_BNODE]; |
| 9079 | thisAgent->if_no_sharing[UNHASHED_MP_BNODE] = 0; |
| 9080 | } |
| 9081 | |
| 9082 | /* Returns 0 if result invalid, 1 if result valid */ |
| 9083 | int get_node_count_statistic(agent* thisAgent, |
no test coverage detected