From 1158800d1bdebd56dc083b3759d7aa6c8bef223e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 7 Feb 2017 10:14:46 +0100 Subject: PIL_time_utildefines: also show total time in TIMEIT_AVERAGED. --- source/blender/blenlib/PIL_time_utildefines.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '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 9157e04a7bf..412cfb3a090 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 -- cgit v1.2.3