diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-17 16:55:47 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-04-17 16:57:13 +0300 |
commit | 3a015bb76b0325cdf542356c89f2b7d2b196895a (patch) | |
tree | b24cf9c9785a11be22c02528e41a888d0c98fdd4 /source/blender/blenkernel/intern/scene.c | |
parent | 15d3d8560d7cee0def23b8a1145ddd0801fca8ea (diff) |
Depsgraph: Report total time spent on scene update
Previously was only per-thread timing.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 60b05cea21b..07e2a186444 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1479,6 +1479,7 @@ static void scene_update_object_add_task(void *node, void *user_data) static void print_threads_statistics(ThreadedObjectUpdateState *state) { int i, tot_thread; + double finish_time; if ((G.debug & G_DEBUG_DEPSGRAPH) == 0) { return; @@ -1504,6 +1505,7 @@ static void print_threads_statistics(ThreadedObjectUpdateState *state) } } #else + finish_time = PIL_check_seconds_timer(); tot_thread = BLI_system_thread_count(); for (i = 0; i < tot_thread; i++) { @@ -1533,6 +1535,9 @@ static void print_threads_statistics(ThreadedObjectUpdateState *state) BLI_freelistN(&state->statistics[i]); } + if (state->has_updated_objects) { + printf("Scene update in %f sec\n", finish_time - state->base_time); + } #endif } |