diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 12:38:02 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-27 12:38:02 +0300 |
commit | 408a2a8420c9d918236194007c01e1d3b3ebe13c (patch) | |
tree | 443d3c8281aeb14bc3dfeafd4d3d74554c4369db /source/blender/compositor/intern/COM_ExecutionGroup.cpp | |
parent | a12b2ec66dbadd3ff06883d80509773139a40262 (diff) |
Compositor: Improve reports to the interface about what's going on
The functionality was got lost when new compositor system was landed
and it wasn't always clear what's causing the hicucps. Now it's nicely
reported to the stats line.
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionGroup.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionGroup.cpp | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 366c97b50c6..a122d5d9988 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -377,35 +377,6 @@ MemoryBuffer *ExecutionGroup::constructConsolidatedMemoryBuffer(MemoryProxy *mem return result; } -void ExecutionGroup::printBackgroundStats(void) -{ - uintptr_t mem_in_use, mmap_in_use, peak_memory; - float megs_used_memory, mmap_used_memory, megs_peak_memory; - double execution_time; - char timestr[64]; - - execution_time = PIL_check_seconds_timer() - this->m_executionStartTime; - - mem_in_use = MEM_get_memory_in_use(); - mmap_in_use = MEM_get_mapped_memory_in_use(); - peak_memory = MEM_get_peak_memory(); - - megs_used_memory = (mem_in_use - mmap_in_use) / (1024.0 * 1024.0); - mmap_used_memory = (mmap_in_use) / (1024.0 * 1024.0); - megs_peak_memory = (peak_memory) / (1024.0 * 1024.0); - - fprintf(stdout, "Mem:%.2fM (%.2fM, Peak %.2fM) ", - megs_used_memory, mmap_used_memory, megs_peak_memory); - - BLI_timestr(execution_time, timestr, sizeof(timestr)); - printf("| Elapsed %s ", timestr); - printf("| Tree %s, Tile %u-%u ", this->m_bTree->id.name + 2, - this->m_chunksFinished, this->m_numberOfChunks); - - fputc('\n', stdout); - fflush(stdout); -} - void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memoryBuffers) { if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED) @@ -430,8 +401,11 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo progress /= this->m_numberOfChunks; this->m_bTree->progress(this->m_bTree->prh, progress); - if (G.background) - printBackgroundStats(); + char buf[128]; + BLI_snprintf(buf, sizeof(buf), "Compositing | Tile %d-%d", + this->m_chunksFinished, + this->m_numberOfChunks); + this->m_bTree->stats_draw(this->m_bTree->sdh, buf); } } |