Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
Instrumentor.h File Reference

Provides instrumentation and profiling utilities. More...

#include "Vesper/Core/Log.h"
#include <algorithm>
#include <chrono>
#include <fstream>
#include <iomanip>
#include <string>
#include <thread>
#include <mutex>
#include <sstream>

Go to the source code of this file.

Classes

struct  Vesper::ProfileResult
struct  Vesper::InstrumentationSession
class  Vesper::Instrumentor
class  Vesper::InstrumentationTimer
struct  InstrumentorUtils::ChangeResult< N >

Namespaces

namespace  Vesper
 TEMPORARY.
namespace  InstrumentorUtils

Macros

#define VZ_PROFILE   1
#define VZ_FUNC_SIG   "VZ_FUNC_SIG unknown!"
#define VZ_PROFILE_BEGIN_SESSION(name, filepath)
#define VZ_PROFILE_END_SESSION()
#define VZ_PROFILE_SCOPE_LINE2(name, line)
#define VZ_PROFILE_SCOPE_LINE(name, line)
#define VZ_PROFILE_SCOPE(name)
#define VZ_PROFILE_FUNCTION()

Typedefs

using Vesper::FloatingPointMicroseconds = std::chrono::duration<double, std::micro>

Functions

template<size_t N, size_t K>
constexpr auto InstrumentorUtils::CleanupOutputString (const char(&expr)[N], const char(&remove)[K])

Detailed Description

Provides instrumentation and profiling utilities.

Author
TheCherno
Damon S. Green II

Class Documentation

◆ Vesper::ProfileResult

struct Vesper::ProfileResult
Class Members
long long End
string Name
long long Start
uint32_t ThreadID

◆ Vesper::InstrumentationSession

struct Vesper::InstrumentationSession
Class Members
string Name

◆ InstrumentorUtils::ChangeResult

struct InstrumentorUtils::ChangeResult
template<size_t N>
struct InstrumentorUtils::ChangeResult< N >
Class Members
char Data[N]

Macro Definition Documentation

◆ VZ_FUNC_SIG

#define VZ_FUNC_SIG   "VZ_FUNC_SIG unknown!"

◆ VZ_PROFILE

#define VZ_PROFILE   1

◆ VZ_PROFILE_BEGIN_SESSION

#define VZ_PROFILE_BEGIN_SESSION ( name,
filepath )
Value:
static Instrumentor & Get()
Definition Instrumentor.h:138
void BeginSession(const std::string &name, const std::string &filepath="results.json")
Definition Instrumentor.h:58

◆ VZ_PROFILE_END_SESSION

#define VZ_PROFILE_END_SESSION ( )
Value:
void EndSession()
Definition Instrumentor.h:84

◆ VZ_PROFILE_FUNCTION

#define VZ_PROFILE_FUNCTION ( )
Value:
#define VZ_FUNC_SIG
Definition Instrumentor.h:231
#define VZ_PROFILE_SCOPE(name)
Definition Instrumentor.h:239

◆ VZ_PROFILE_SCOPE

#define VZ_PROFILE_SCOPE ( name)
Value:
VZ_PROFILE_SCOPE_LINE(name, __LINE__)
#define VZ_PROFILE_SCOPE_LINE(name, line)
Definition Instrumentor.h:238

◆ VZ_PROFILE_SCOPE_LINE

#define VZ_PROFILE_SCOPE_LINE ( name,
line )
Value:
#define VZ_PROFILE_SCOPE_LINE2(name, line)
Definition Instrumentor.h:236

◆ VZ_PROFILE_SCOPE_LINE2

#define VZ_PROFILE_SCOPE_LINE2 ( name,
line )
Value:
constexpr auto fixedName##line = InstrumentorUtils::CleanupOutputString(name, "__cdecl ");\
::Vesper::InstrumentationTimer timer##line(fixedName##line.Data)
Definition Instrumentor.h:146
constexpr auto CleanupOutputString(const char(&expr)[N], const char(&remove)[K])
Definition Instrumentor.h:190
236 #define VZ_PROFILE_SCOPE_LINE2(name, line) constexpr auto fixedName##line = InstrumentorUtils::CleanupOutputString(name, "__cdecl ");\
237 ::Vesper::InstrumentationTimer timer##line(fixedName##line.Data)