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

Functions

auto bactria_reports_create_report (char const *name) -> void *
 Creates a plugin-specific report handle. More...
 
auto bactria_reports_destroy_report (void *report_handle) noexcept -> void
 Destroys a plugin-specific report handle. More...
 
auto bactria_reports_write_report (void *report_handle) -> void
 Writes a report to disk (or other data sinks). More...
 
auto bactria_reports_record_bool (void *report_handle, char const *key, bool value) -> void
 Adds a boolean value to the report. More...
 
auto bactria_reports_record_int8 (void *report_handle, char const *key, std::int8_t value) -> void
 Adds a int8_t value to the report. More...
 
auto bactria_reports_record_uint8 (void *report_handle, char const *key, std::uint8_t value) -> void
 Adds a uint8_t value to the report. More...
 
auto bactria_reports_record_int16 (void *report_handle, char const *key, std::int16_t value) -> void
 Adds a int16_t value to the report. More...
 
auto bactria_reports_record_uint16 (void *report_handle, char const *key, std::uint16_t value) -> void
 Adds a uint16_t value to the report. More...
 
auto bactria_reports_record_int32 (void *report_handle, char const *key, std::int16_t value) -> void
 Adds a int32_t value to the report. More...
 
auto bactria_reports_record_uint32 (void *report_handle, char const *key, std::uint16_t value) -> void
 Adds a uint32_t value to the report. More...
 
auto bactria_reports_record_int64 (void *report_handle, char const *key, std::int64_t value) -> void
 Adds a int64_t value to the report. More...
 
auto bactria_reports_record_uint64 (void *report_handle, char const *key, std::uint64_t value) -> void
 Adds a uint64_t value to the report. More...
 
auto bactria_reports_record_float (void *report_handle, char const *key, float value) -> void
 Adds a float value to the report. More...
 
auto bactria_reports_record_double (void *report_handle, char const *key, double value) -> void
 Adds a double value to the report. More...
 
auto bactria_reports_record_string (void *report_handle, char const *key, char const *value) -> void
 Adds a string value to the report. More...
 

Detailed Description

This is the interface for a reports plugin. Plugin developers should include reports/PluginInterface.hpp and implement all functions listed here.

Function Documentation

◆ bactria_reports_create_report()

auto bactria_reports_create_report ( char const *  name) -> void *

Creates a plugin-specific report handle.

This function creates a plugin-specific report handle which is subsequently used by the Report class.

Parameters
nameThe (file)name without any file extension.
Returns
The plugin-specific report handle.
See also
Report::Report()

◆ bactria_reports_destroy_report()

auto bactria_reports_destroy_report ( void *  report_handle) -> void
noexcept

Destroys a plugin-specific report handle.

This function destroys a plugin-specific report handle. Accessing the handle after a call to this function results in undefined behaviour.

Parameters
report_handleA plugin-specific report handle.
See also
Report::~Report()

◆ bactria_reports_record_bool()

auto bactria_reports_record_bool ( void *  report_handle,
char const *  key,
bool  value 
) -> void

Adds a boolean value to the report.

Writes a boolean value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_double()

auto bactria_reports_record_double ( void *  report_handle,
char const *  key,
double  value 
) -> void

Adds a double value to the report.

Writes a double value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_float()

auto bactria_reports_record_float ( void *  report_handle,
char const *  key,
float  value 
) -> void

Adds a float value to the report.

Writes a float value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_int16()

auto bactria_reports_record_int16 ( void *  report_handle,
char const *  key,
std::int16_t  value 
) -> void

Adds a int16_t value to the report.

Writes a int16_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_int32()

auto bactria_reports_record_int32 ( void *  report_handle,
char const *  key,
std::int16_t  value 
) -> void

Adds a int32_t value to the report.

Writes a int32_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_int64()

auto bactria_reports_record_int64 ( void *  report_handle,
char const *  key,
std::int64_t  value 
) -> void

Adds a int64_t value to the report.

Writes a int64_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_int8()

auto bactria_reports_record_int8 ( void *  report_handle,
char const *  key,
std::int8_t  value 
) -> void

Adds a int8_t value to the report.

Writes a int8_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_string()

auto bactria_reports_record_string ( void *  report_handle,
char const *  key,
char const *  value 
) -> void

Adds a string value to the report.

Writes a string value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_uint16()

auto bactria_reports_record_uint16 ( void *  report_handle,
char const *  key,
std::uint16_t  value 
) -> void

Adds a uint16_t value to the report.

Writes a uint16_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_uint32()

auto bactria_reports_record_uint32 ( void *  report_handle,
char const *  key,
std::uint16_t  value 
) -> void

Adds a uint32_t value to the report.

Writes a uint32_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_uint64()

auto bactria_reports_record_uint64 ( void *  report_handle,
char const *  key,
std::uint64_t  value 
) -> void

Adds a uint64_t value to the report.

Writes a uint64_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_record_uint8()

auto bactria_reports_record_uint8 ( void *  report_handle,
char const *  key,
std::uint8_t  value 
) -> void

Adds a uint8_t value to the report.

Writes a uint8_t value to the report.

Parameters
report_handleA plugin-specific report handle.
keyThe identifier of the value.
valueThe value to be saved.
See also
IncidentRecorder::store()

◆ bactria_reports_write_report()

auto bactria_reports_write_report ( void *  report_handle) -> void

Writes a report to disk (or other data sinks).

This function saves a report to the plugin-specific data sink (a file, a database, ...).

Parameters
report_handleA plugin-specific report handle.
See also
IncidentRecorder::submit_report(), Report::submit()