Page MenuHome

Cycles: Logging for Graph clean()
Needs RevisionPublic

Authored by Thomas Dinges (dingto) on Dec 23 2015, 10:20 PM.

Details

Summary

Hi,
straightforward patch, but maybe we can solve the name argument differently?

Diff Detail

Event Timeline

Thomas Dinges (dingto) retitled this revision from to Cycles: Logging for Graph clean().
Thomas Dinges (dingto) updated this object.
Sergey Sharybin (sergey) requested changes to this revision.Dec 24 2015, 10:04 AM
Sergey Sharybin (sergey) edited edge metadata.

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.

This revision now requires changes to proceed.Dec 24 2015, 10:04 AM

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