Blender  V3.3
Classes | Namespaces | Macros | Typedefs | Functions
BLI_timeit.hh File Reference
#include <chrono>
#include <iostream>
#include <string>
#include "BLI_sys_types.h"

Go to the source code of this file.

Classes

class  blender::timeit::ScopedTimer
 
class  blender::timeit::ScopedTimerAveraged
 

Namespaces

 blender
 
 blender::timeit
 

Macros

#define SCOPED_TIMER(name)   blender::timeit::ScopedTimer scoped_timer(name)
 
#define SCOPED_TIMER_AVERAGED(name)
 

Typedefs

using blender::timeit::Clock = std::chrono::steady_clock
 
using blender::timeit::TimePoint = Clock::time_point
 
using blender::timeit::Nanoseconds = std::chrono::nanoseconds
 

Functions

void blender::timeit::print_duration (Nanoseconds duration)
 

Macro Definition Documentation

◆ SCOPED_TIMER

#define SCOPED_TIMER (   name)    blender::timeit::ScopedTimer scoped_timer(name)

Definition at line 68 of file BLI_timeit.hh.

◆ SCOPED_TIMER_AVERAGED

#define SCOPED_TIMER_AVERAGED (   name)
Value:
static int64_t total_count_; \
static blender::timeit::Nanoseconds total_time_; \
blender::timeit::ScopedTimerAveraged scoped_timer(name, total_count_, total_time_, min_time_)
std::chrono::nanoseconds Nanoseconds
Definition: BLI_timeit.hh:15
__int64 int64_t
Definition: stdint.h:89
float max

Print the average and minimum runtime of the timer's scope.

Warning
This uses static variables, so it is not thread-safe.

Definition at line 74 of file BLI_timeit.hh.