guanaqo 1.0.0-alpha.28
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 136 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 reserve (size_t capacity)
 Set the maximum number of logs that can be recorded. Additional logs are discarded.
void reset ()
 Clear all recorded logs, but keep the reserved capacity.
void clear ()
 Clear all recorded logs and set capacity to 0 (essentially disabling the logger).

Static Public Member Functions

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

Public Attributes

std::vector< Loglogs

Static Public Attributes

static clock::time_point t0 = clock::now()

Member Typedef Documentation

◆ clock

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

Definition at line 157 of file trace.hpp.

Constructor & Destructor Documentation

◆ TraceLogger()

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

Definition at line 181 of file trace.hpp.

Member Function Documentation

◆ write_column_headings()

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

Definition at line 152 of file trace.hpp.

◆ trace()

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

Definition at line 183 of file trace.hpp.

Here is the call graph for this function:
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.

◆ reserve()

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

Set the maximum number of logs that can be recorded. Additional logs are discarded.

Definition at line 208 of file trace.hpp.

◆ reset()

void guanaqo::TraceLogger::reset ( )
inline

Clear all recorded logs, but keep the reserved capacity.

Definition at line 210 of file trace.hpp.

◆ clear()

void guanaqo::TraceLogger::clear ( )
inline

Clear all recorded logs and set capacity to 0 (essentially disabling the logger).

Definition at line 212 of file trace.hpp.

Member Data Documentation

◆ t0

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

Definition at line 159 of file trace.hpp.

◆ logs

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

Definition at line 160 of file trace.hpp.


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