Commit: 9a0ef0933d39f37e2267102f097ef7e4497d7789
Author: Joshua Leung
Date:   Thu Aug 23 02:51:01 2018 +1200
Branches: blender2.8
https://developer.blender.org/rB9a0ef0933d39f37e2267102f097ef7e4497d7789

Depsgraph: Print simple stats after filtering graph, to quickly verify if 
anything happened

===================================================================

M       source/blender/depsgraph/intern/depsgraph_query_filter.cc

===================================================================

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;
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to