guanaqo develop
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::TraceLogger Struct Reference

#include <guanaqo/trace.hpp>

Detailed Description

Class for recording trace logs, used when ITT or Perfetto tracing is not enabled.

Definition at line 133 of file trace.hpp.

Collaboration diagram for guanaqo::TraceLogger:

Classes

struct  Log
struct  ScopedLog

Public Types

using clock = std::chrono::steady_clock

Public Member Functions

 TraceLogger (size_t capacity)
ScopedLog trace (const char *name, int64_t instance, int64_t flop_count=-1)
void trace_instant (const char *name, int64_t instance, int64_t flop_count=-1)
std::span< const Logget_logs () const
void reset ()

Static Public Member Functions

static std::ostream & write_column_headings (std::ostream &os)

Public Attributes

clock::time_point t0 = clock::now()
std::vector< Loglogs
std::atomic_size_t count {0}

Member Typedef Documentation

◆ clock

using guanaqo::TraceLogger::clock = std::chrono::steady_clock

Definition at line 154 of file trace.hpp.

Constructor & Destructor Documentation

◆ TraceLogger()

guanaqo::TraceLogger::TraceLogger ( size_t capacity)
inline

Definition at line 179 of file trace.hpp.

Member Function Documentation

◆ write_column_headings()

std::ostream & guanaqo::TraceLogger::write_column_headings ( std::ostream & os)
inlinestatic

Definition at line 149 of file trace.hpp.

◆ trace()

ScopedLog guanaqo::TraceLogger::trace ( const char * name,
int64_t instance,
int64_t flop_count = -1 )
inlinenodiscard

Definition at line 181 of file trace.hpp.

Here is the caller graph for this function:

◆ trace_instant()

void guanaqo::TraceLogger::trace_instant ( const char * name,
int64_t instance,
int64_t flop_count = -1 )
inline

Definition at line 197 of file trace.hpp.

Here is the call graph for this function:

◆ get_logs()

std::span< const Log > guanaqo::TraceLogger::get_logs ( ) const
inlinenodiscard

Definition at line 203 of file trace.hpp.

◆ reset()

void guanaqo::TraceLogger::reset ( )
inline

Definition at line 208 of file trace.hpp.

Member Data Documentation

◆ t0

clock::time_point guanaqo::TraceLogger::t0 = clock::now()

Definition at line 156 of file trace.hpp.

◆ logs

std::vector<Log> guanaqo::TraceLogger::logs

Definition at line 157 of file trace.hpp.

◆ count

std::atomic_size_t guanaqo::TraceLogger::count {0}

Definition at line 158 of file trace.hpp.


The documentation for this struct was generated from the following file: