Skip to content

Profiling library to assess code performance, based on timers.

License

Notifications You must be signed in to change notification settings

vortechbv/vt-timers

Repository files navigation

Build Status Build status

vt_timers

General description

Library to instrument a code with timers and report the results in a tree view. Works with multiple threads (incl. OpenMP).

Building

  • Build with CMake.
  • Contains tests based on google test, which is downloaded automatically during CMake generation time. Test targets and google test framework are only built if VT_TIMERS_ENABLE_TESTS is switched ON.
  • Requires a C++11 compiler. Tested with Visual Studio 2015 and GCC under linux. Compiles with MinGW, but crashes, see below.

Known issues

Suggestions for future work

  • add Fortran interface
  • reconsider the use of std::map (e.g. is std::unordered_map better? should we build our own data structure based on indices instead of key-value pairs based on strings?)
  • include cpu time (user, other)
  • add a scoped timer, to ensure exception safety
  • aggregate timers from different threads
  • does it work with other compilers, e.g. Clang?
  • does it work with pthreads?
  • add option to disable all timer function calls (e.g. via a preprocessor define that may or may not include #if 0)
  • add option to disable all error checking code (e.g. via a preprocessor define)
  • ensure correct workings with shared libraries (in view of static and static thread_local usage)
  • use python to visualize a timing report
  • suggestion: if we encouter problems, it may be useful to consider omp threadlocal variables.

History

This code was inspired and partially based on the Fortran code TimeKeeper developed at VORtech (Delft).

License

This software is licensed under the MIT license, see LICENSE.MIT.

About

Profiling library to assess code performance, based on timers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published