[Bf-blender-cvs] [1158800d1b] master: PIL_time_utildefines: also show total time in TIMEIT_AVERAGED.
Bastien Montagne
noreply at git.blender.org
Tue Feb 7 10:16:02 CET 2017
Commit: 1158800d1bdebd56dc083b3759d7aa6c8bef223e
Author: Bastien Montagne
Date: Tue Feb 7 10:14:46 2017 +0100
Branches: master
https://developer.blender.org/rB1158800d1bdebd56dc083b3759d7aa6c8bef223e
PIL_time_utildefines: also show total time in TIMEIT_AVERAGED.
===================================================================
M source/blender/blenlib/PIL_time_utildefines.h
===================================================================
diff --git a/source/blender/blenlib/PIL_time_utildefines.h b/source/blender/blenlib/PIL_time_utildefines.h
index 9157e04a7b..412cfb3a09 100644
--- a/source/blender/blenlib/PIL_time_utildefines.h
+++ b/source/blender/blenlib/PIL_time_utildefines.h
@@ -80,9 +80,10 @@
} \
const float _delta_##var = TIMEIT_VALUE(var); \
_sum_##var += _delta_##var; \
+ _num_##var++; \
printf("time end (" #var "): %.6f" " " AT "\n", _delta_##var); \
- printf("time averaged (" #var "): %.6f" " " AT "\n", \
- (_sum_##var / ++_num_##var)); \
+ printf("time averaged (" #var "): %.6f (total: %.6f, in %d runs)\n", \
+ (_sum_##var / _num_##var), _sum_##var, (int)_num_##var); \
fflush(stdout); \
} (void)0
More information about the Bf-blender-cvs
mailing list