Hi,
straightforward patch, but maybe we can solve the name argument differently?
Details
Details
- Reviewers
Sergey Sharybin (sergey)
Diff Detail
Diff Detail
Event Timeline
Comment Actions
With this approach you:
- Deligating some paren't class logic to a child one
- Don't have clear logging of what the graph is (actual shader, bump etc).
Better thing to do would be to:
- Have Graph::log_stats()
- Shader does VLOG(1) << "Shader " << name << " graph: stats\n" << graph->log_stats(); VLOG(1) << "Shader " << name << "bump graph stats:\n" << graph->log_stats();(with proper stlye tho).
Alternatively, we can go with Graph::get_stats() which returns string which we then can a) report to the interface (we really need to solve this damn UI issue with logging extra info from Libmv/DAG/Cycles to artists) b) simply do VLOG(1) << graph.get_stats(). We have similar thing for the Device capabilities actually.
Comment Actions
As for the alternative approach, i've implemented similar thing for the SVM compiler (rB1a246af). IMO, this is something we should be using for stats / reports. Most flexible for all sorts of use. Was proven by the motrack department ;)