bactria  0.0.1
The bactria library is a header-only C++14 library for profiling and tracing.
Collaboration diagram for User API:

Classes

class  bactria::reports::Incident< TValue >
 The incident type. More...
 
class  bactria::reports::IncidentRecorder< TValues >
 Class for dynamic recording of Incidents. More...
 
class  bactria::reports::Report< TIncidents >
 The report class. More...
 

Functions

template<typename TValue >
auto bactria::reports::make_incident (std::string key, TValue value) -> Incident< std::remove_reference_t< TValue >>
 Create an incident from a key and a value. More...
 
template<typename... TIncidents>
auto bactria::reports::make_report (std::string name, TIncidents &&... incidents) -> Report< TIncidents... >
 Create a Report from several Incidents. More...
 

Detailed Description

User API for bactria's reports functionality.

Function Documentation

◆ make_incident()

template<typename TValue >
auto bactria::reports::make_incident ( std::string  key,
TValue  value 
) -> Incident<std::remove_reference_t<TValue>>

Create an incident from a key and a value.

Creates an Incident from a key and a value.

Template Parameters
TValueThe type of the value to store in the Incident.
Parameters
keyThe key to store the value under.
valueThe value to record. If value is a reference type, it will be copied to a new object which is stored in the Incident.
Returns
An Incident object that can be stored in a Report.

◆ make_report()

template<typename... TIncidents>
auto bactria::reports::make_report ( std::string  name,
TIncidents &&...  incidents 
) -> Report<TIncidents...>

Create a Report from several Incidents.

Template Parameters
TIncidentsThe Incident types to save.
Parameters
nameThe storage name. This is usually a filename which must not contain a file extension.
incidentsThe Incidents to save.
Returns
A Report object containing the Incidents.