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_ranges_create_event (std::uint32_t color, char const *cat_name, std::uint32_t cat_id) noexcept -> void *
 Create an event handle. More...
 
auto bactria_ranges_destroy_event (void *event_handle) noexcept -> void
 Destroy an event handle. More...
 
auto bactria_ranges_fire_event (void *event_handle, char const *event_name, char const *source, std::uint32_t lineno, char const *caller) noexcept -> void
 Fire an event. More...
 
auto bactria_ranges_create_range (char const *name, std::uint32_t color, char const *cat_name, std::uint32_t cat_id) noexcept -> void *
 Create a range handle. More...
 
auto bactria_ranges_destroy_range (void *range_handle) noexcept -> void
 Destroy a range handle. More...
 
auto bactria_ranges_start_range (void *range_handle) noexcept -> void
 Start a range. More...
 
auto bactria_ranges_stop_range (void *range_handle) noexcept -> void
 Stop a range. More...
 

Detailed Description

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

Function Documentation

◆ bactria_ranges_create_event()

auto bactria_ranges_create_event ( std::uint32_t  color,
char const *  cat_name,
std::uint32_t  cat_id 
) -> void *
noexcept

Create an event handle.

This function creates a plugin-specific event handle. This is internally used by bactria::Event to communicate with the plugin. Each bactria::Event encapsulates its own event handle.

Parameters
[in]colorThe color of the event (as it should appear on the visualizer).
[in]cat_nameThe category's name (for filtering).
[in]cat_idThe category's id (for filtering).
Returns
A handle to the plugin-specific event.
See also
bactria_ranges_destroy_event, bactria_ranges_fire_event

◆ bactria_ranges_create_range()

auto bactria_ranges_create_range ( char const *  name,
std::uint32_t  color,
char const *  cat_name,
std::uint32_t  cat_id 
) -> void *
noexcept

Create a range handle.

This function creates a plugin-specific range handle. This is internally used by bactria::Range to communicate with the plugin. Each bactria::Range encapsulates its own range handle.

Parameters
[in]nameThe name of the range (as it should appear on the visualizer).
[in]colorThe color of the range (as it should appear on the visualizer).
[in]cat_nameThe category's name (for filtering).
[in]cat_idThe category's id (for filtering).
Returns
A handle to the plugin-specific range.
See also
bactria_ranges_destroy_range, bactria_ranges_start_range, bactria_ranges_stop_range

◆ bactria_ranges_destroy_event()

auto bactria_ranges_destroy_event ( void *  event_handle) -> void
noexcept

Destroy an event handle.

This function destroys a plugin-specific event handle. It is called internally by bactria::Event::~Event(). The event_handle must not be used after the call unless it has been reinitialized with bactria_ranges_create_event().

Parameters
[in]event_handleThe event handle created by bactria_ranges_create_event().
See also
bactria_ranges_create_event, bactria_ranges_fire_event

◆ bactria_ranges_destroy_range()

auto bactria_ranges_destroy_range ( void *  range_handle) -> void
noexcept

Destroy a range handle.

This function destroys a plugin-specific range handle. It is called internally by bactria::Range::~Range(). The range_handle must not be used after the call unless it has been reinitialized with bactria_ranges_create_range().

Parameters
[in]range_handleThe event handle created by bactria_ranges_create_event().
See also
bactria_ranges_create_range, bactria_ranges_start_range, bactria_ranges_stop_range

◆ bactria_ranges_fire_event()

auto bactria_ranges_fire_event ( void *  event_handle,
char const *  event_name,
char const *  source,
std::uint32_t  lineno,
char const *  caller 
) -> void
noexcept

Fire an event.

This function fires a plugin-specific event. It is called internally by bactria::Event::fire().

Parameters
[in,out]event_handleThe event handle created by bactria_ranges_create_event().
[in]event_nameThe name of the event (as it should appear on the visualizer).
[in]sourceThe event's source file location.
[in]linenoThe event's source line location.
[in]callerThe event's calling function.
See also
bactria_ranges_create_event, bactria_ranges_destroy_event

◆ bactria_ranges_start_range()

auto bactria_ranges_start_range ( void *  range_handle) -> void
noexcept

Start a range.

This function starts a plugin-specific range. It is called internally by bactria::Range::start().

Parameters
[in,out]range_handleThe range handle created by bactria_ranges_create_range().
See also
bactria_ranges_create_range, bactria_ranges_destroy_range, bactria_ranges_stop_range

◆ bactria_ranges_stop_range()

auto bactria_ranges_stop_range ( void *  range_handle) -> void
noexcept

Stop a range.

This function stops a plugin-specific range. It is called internally by bactria::Range::stop().

Parameters
[in,out]range_handleThe range handle created by bactria_ranges_create_range().
See also
bactria_ranges_create_range, bactria_ranges_destroy_range, bactria_ranges_start_range