diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-02-07 12:14:46 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-02-07 12:14:46 +0300 |
commit | 1158800d1bdebd56dc083b3759d7aa6c8bef223e (patch) | |
tree | dc08f0e749b3f7014edb90898a9ee2d93e731e7d /source/blender/blenlib/PIL_time_utildefines.h | |
parent | f7eaaf35b4255e923b47711fdcf6ff823be977c6 (diff) |
PIL_time_utildefines: also show total time in TIMEIT_AVERAGED.
Diffstat (limited to 'source/blender/blenlib/PIL_time_utildefines.h')
-rw-r--r-- | source/blender/blenlib/PIL_time_utildefines.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 |