Muto 0.0.1
Cross-Platform Application Template
GitHub Repo | Muto Updates | Muto's Author
Loading...
Searching...
No Matches
Instrumentor.h File Reference

Provides instrumentation and profiling utilities. More...

#include "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  InstrumentorUtils::ChangeResult< N >
 
struct  Muto::InstrumentationSession
 
class  Muto::InstrumentationTimer
 
class  Muto::Instrumentor
 
struct  Muto::ProfileResult
 

Namespaces

namespace  InstrumentorUtils
 
namespace  Muto
 The main namespace for the Muto engine.
 

Macros

#define MU_FUNC_SIG   "MU_FUNC_SIG unknown!"
 
#define MU_PROFILE   1
 
#define MU_PROFILE_BEGIN_SESSION(name, filepath)   ::Muto::Instrumentor::Get().BeginSession(name, filepath)
 
#define MU_PROFILE_END_SESSION()   ::Muto::Instrumentor::Get().EndSession()
 
#define MU_PROFILE_FUNCTION()   MU_PROFILE_SCOPE(MU_FUNC_SIG)
 
#define MU_PROFILE_SCOPE(name)   MU_PROFILE_SCOPE_LINE(name, __LINE__)
 
#define MU_PROFILE_SCOPE_LINE(name, line)   MU_PROFILE_SCOPE_LINE2(name, line)
 
#define MU_PROFILE_SCOPE_LINE2(name, line)
 

Typedefs

using Muto::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

◆ InstrumentorUtils::ChangeResult

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

◆ Muto::InstrumentationSession

struct Muto::InstrumentationSession
Class Members
string Name

◆ Muto::ProfileResult

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

Macro Definition Documentation

◆ MU_FUNC_SIG

#define MU_FUNC_SIG   "MU_FUNC_SIG unknown!"

◆ MU_PROFILE

#define MU_PROFILE   1

◆ MU_PROFILE_BEGIN_SESSION

#define MU_PROFILE_BEGIN_SESSION (   name,
  filepath 
)    ::Muto::Instrumentor::Get().BeginSession(name, filepath)

◆ MU_PROFILE_END_SESSION

#define MU_PROFILE_END_SESSION ( )    ::Muto::Instrumentor::Get().EndSession()

◆ MU_PROFILE_FUNCTION

#define MU_PROFILE_FUNCTION ( )    MU_PROFILE_SCOPE(MU_FUNC_SIG)

◆ MU_PROFILE_SCOPE

#define MU_PROFILE_SCOPE (   name)    MU_PROFILE_SCOPE_LINE(name, __LINE__)

◆ MU_PROFILE_SCOPE_LINE

#define MU_PROFILE_SCOPE_LINE (   name,
  line 
)    MU_PROFILE_SCOPE_LINE2(name, line)

◆ MU_PROFILE_SCOPE_LINE2

#define MU_PROFILE_SCOPE_LINE2 (   name,
  line 
)
Value:
constexpr auto fixedName##line = InstrumentorUtils::CleanupOutputString(name, "__cdecl ");\
::Muto::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