Traversal statistics accumulating and reporting. More...
#include <TreeStats.hpp>
Public Member Functions | |
TreeStats () | |
constructor More... | |
ErrorCode | compute_stats (Interface *impl, EntityHandle root_node) |
Given a root node, compute the stats for a tree. More... | |
void | reset_trav_stats () |
reset traversal counters More... | |
void | reset () |
reset all counters More... | |
void | print () const |
print the contents of this structure More... | |
void | output_all_stats (const bool with_endl=true) const |
output all the contents of this structure on a single line More... | |
void | output_trav_stats (const bool with_endl=true) const |
output just the traversal stats of this structure on a single line More... | |
Public Attributes | |
double | initTime |
unsigned int | maxDepth |
unsigned int | numNodes |
unsigned int | numLeaves |
double | avgObjPerLeaf |
unsigned int | minObjPerLeaf |
unsigned int | maxObjPerLeaf |
unsigned int | nodesVisited |
unsigned int | leavesVisited |
unsigned int | numTraversals |
unsigned int | constructLeafObjectTests |
unsigned int | traversalLeafObjectTests |
unsigned int | boxElemTests |
Private Member Functions | |
ErrorCode | traverse (Interface *impl, EntityHandle node, unsigned int &depth) |
Traversal statistics accumulating and reporting.
Class to accumulate statistics on traversal performance. This structure contains the count of nodes visited at each level in a tree, and the count of traversals that ended at each level. One TrvStats structure can be used with multiple trees or multiple queries, or used on only a single tree or a single query.
Note that these traversal statistics are not related to the stats() query below, which calculates static information about a tree. These statistics relate to a tree's dynamic behavior on particular operations.
Definition at line 26 of file TreeStats.hpp.
|
inline |
|
inline |
Given a root node, compute the stats for a tree.
impl | MOAB instance pointer |
root_node | Root entity set for the tree |
Definition at line 81 of file TreeStats.hpp.
References avgObjPerLeaf, ErrorCode, maxDepth, maxObjPerLeaf, minObjPerLeaf, numLeaves, numNodes, and traverse().
Referenced by moab::AdaptiveKDTree::build_tree(), and moab::BVHTree::build_tree().
|
inline |
output all the contents of this structure on a single line
Definition at line 170 of file TreeStats.hpp.
References avgObjPerLeaf, boxElemTests, constructLeafObjectTests, initTime, leavesVisited, maxDepth, maxObjPerLeaf, minObjPerLeaf, nodesVisited, numLeaves, numNodes, numTraversals, and traversalLeafObjectTests.
|
inline |
output just the traversal stats of this structure on a single line
Definition at line 178 of file TreeStats.hpp.
References leavesVisited, nodesVisited, numTraversals, and traversalLeafObjectTests.
|
inline |
print the contents of this structure
Definition at line 149 of file TreeStats.hpp.
References avgObjPerLeaf, boxElemTests, constructLeafObjectTests, initTime, leavesVisited, maxDepth, maxObjPerLeaf, minObjPerLeaf, nodesVisited, numLeaves, numNodes, numTraversals, and traversalLeafObjectTests.
Referenced by DeformMeshRemap::execute().
|
inline |
reset all counters
Definition at line 125 of file TreeStats.hpp.
References avgObjPerLeaf, boxElemTests, constructLeafObjectTests, initTime, maxDepth, maxObjPerLeaf, minObjPerLeaf, numLeaves, numNodes, and reset_trav_stats().
Referenced by moab::AdaptiveKDTree::build_tree(), moab::BVHTree::build_tree(), and TreeStats().
|
inline |
reset traversal counters
Definition at line 141 of file TreeStats.hpp.
References leavesVisited, nodesVisited, numTraversals, and traversalLeafObjectTests.
Referenced by reset().
|
inlineprivate |
Definition at line 95 of file TreeStats.hpp.
References avgObjPerLeaf, children, ErrorCode, moab::Interface::get_child_meshsets(), moab::Interface::get_entities_by_handle(), maxObjPerLeaf, MB_SUCCESS, minObjPerLeaf, numLeaves, and numNodes.
Referenced by compute_stats().
double moab::TreeStats::avgObjPerLeaf |
Definition at line 63 of file TreeStats.hpp.
Referenced by compute_stats(), output_all_stats(), print(), reset(), and traverse().
unsigned int moab::TreeStats::boxElemTests |
Definition at line 74 of file TreeStats.hpp.
Referenced by moab::AdaptiveKDTree::intersect_children_with_elems(), output_all_stats(), print(), and reset().
unsigned int moab::TreeStats::constructLeafObjectTests |
Definition at line 71 of file TreeStats.hpp.
Referenced by moab::AdaptiveKDTree::intersect_children_with_elems(), output_all_stats(), print(), and reset().
double moab::TreeStats::initTime |
Definition at line 57 of file TreeStats.hpp.
Referenced by moab::AdaptiveKDTree::build_tree(), moab::BVHTree::build_tree(), output_all_stats(), print(), and reset().
unsigned int moab::TreeStats::leavesVisited |
Definition at line 69 of file TreeStats.hpp.
Referenced by moab::BVHTree::bruteforce_find(), moab::AdaptiveKDTree::distance_search(), moab::BVHTree::distance_search(), moab::BVHTree::find_point(), output_all_stats(), output_trav_stats(), moab::AdaptiveKDTree::point_search(), moab::BVHTree::point_search(), print(), reset_trav_stats(), moab::AdaptiveKDTreeIter::step(), and moab::AdaptiveKDTreeIter::step_to_first_leaf().
unsigned int moab::TreeStats::maxDepth |
Definition at line 60 of file TreeStats.hpp.
Referenced by compute_stats(), output_all_stats(), print(), and reset().
unsigned int moab::TreeStats::maxObjPerLeaf |
Definition at line 65 of file TreeStats.hpp.
Referenced by compute_stats(), output_all_stats(), print(), reset(), and traverse().
unsigned int moab::TreeStats::minObjPerLeaf |
Definition at line 64 of file TreeStats.hpp.
Referenced by compute_stats(), output_all_stats(), print(), reset(), and traverse().
unsigned int moab::TreeStats::nodesVisited |
Definition at line 68 of file TreeStats.hpp.
Referenced by moab::AdaptiveKDTree::distance_search(), moab::BVHTree::distance_search(), moab::BVHTree::find_point(), output_all_stats(), output_trav_stats(), moab::AdaptiveKDTree::point_search(), moab::BVHTree::point_search(), print(), reset_trav_stats(), moab::AdaptiveKDTreeIter::step(), and moab::AdaptiveKDTreeIter::step_to_first_leaf().
unsigned int moab::TreeStats::numLeaves |
Definition at line 62 of file TreeStats.hpp.
Referenced by compute_stats(), output_all_stats(), print(), reset(), and traverse().
unsigned int moab::TreeStats::numNodes |
Definition at line 61 of file TreeStats.hpp.
Referenced by compute_stats(), output_all_stats(), print(), reset(), and traverse().
unsigned int moab::TreeStats::numTraversals |
Definition at line 70 of file TreeStats.hpp.
Referenced by moab::BVHTree::bruteforce_find(), moab::AdaptiveKDTree::distance_search(), moab::BVHTree::distance_search(), moab::BVHTree::find_point(), output_all_stats(), output_trav_stats(), moab::AdaptiveKDTree::point_search(), moab::BVHTree::point_search(), print(), and reset_trav_stats().
unsigned int moab::TreeStats::traversalLeafObjectTests |
Definition at line 73 of file TreeStats.hpp.
Referenced by moab::BVHTree::bruteforce_find(), moab::AdaptiveKDTree::distance_search(), moab::BVHTree::distance_search(), moab::BVHTree::find_point(), moab::AdaptiveKDTreeIter::intersect_ray(), output_all_stats(), output_trav_stats(), moab::AdaptiveKDTree::point_search(), moab::BVHTree::point_search(), print(), and reset_trav_stats().