diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-08-22 17:51:01 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-08-23 08:07:37 +0300 |
commit | 9a0ef0933d39f37e2267102f097ef7e4497d7789 (patch) | |
tree | f3e55aa1235083825bee8714edd6ae07c8f9efba /source/blender/depsgraph | |
parent | be77eeae46e17c1b6ffb0e4d4834a1bd28aedf64 (diff) |
Depsgraph: Print simple stats after filtering graph, to quickly verify if anything happened
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query_filter.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_filter.cc b/source/blender/depsgraph/intern/depsgraph_query_filter.cc index 89becda3ee3..20de3e6f41a 100644 --- a/source/blender/depsgraph/intern/depsgraph_query_filter.cc +++ b/source/blender/depsgraph/intern/depsgraph_query_filter.cc @@ -51,6 +51,7 @@ extern "C" { #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" +#include "DEG_depsgraph_debug.h" #include "util/deg_util_foreach.h" @@ -265,6 +266,17 @@ Depsgraph *DEG_graph_filter(const Depsgraph *graph_src, Main *bmain, DEG_FilterQ BLI_gset_free(retained_ids, NULL); retained_ids = NULL; + /* Print Stats */ + // XXX: Hide behind debug flags + size_t s_outer, s_operations, s_relations; + size_t n_outer, n_operations, n_relations; + + DEG_stats_simple(graph_src, &s_outer, &s_operations, &s_relations); + DEG_stats_simple(graph_new, &n_outer, &n_operations, &n_relations); + + printf("%s: src = (Out: %u, Op: %u, Rel: %u)\n", __func__, s_outer, s_operations, s_relations); // XXX + printf("%s: new = (Out: %u, Op: %u, Rel: %u)\n", __func__, n_outer, n_operations, n_relations); // XXX + /* Return this new graph instance */ return graph_new; } |