Blender Git Commit Log

Git Commits -> Revision c7991bc

Revision c7991bc by Jacques Lucke (master)
April 22, 2020, 10:53 (GMT)
BLI: add ScopedTimer

This adds a simple timer that can be used for performance measurements in C++.
More sophisticated timers are possible (e.g. one that takes averages, logs the results, ...).
However, I found that this simple timer is good enough for 99% of my use cases.

To use it just write `SCOPED_TIMER("my timer name");` or more commonly `SCOPED_TIMER(__func__);`
into some scope.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7491

Commit Details:

Full Hash: c7991bcefcaa2924597bd8fe55ce63905fe0f23e
Parent Commit: 21f811c
Lines Changed: +100, -0

2 Added Paths:

/source/blender/blenlib/BLI_timeit.hh (+62, -0) (View)
/source/blender/blenlib/intern/timeit.cc (+36, -0) (View)

1 Modified Path:

/source/blender/blenlib/CMakeLists.txt (+2, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021