bactria  0.0.1
The bactria library is a header-only C++14 library for profiling and tracing.
PluginInterface.hpp
Go to the documentation of this file.
1 /* Copyright 2021 Jan Stephan
2  *
3  * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by
4  * the European Commission - subsequent versions of the EUPL (the “Licence”).
5  * You may not use this work except in compliance with the Licence.
6  * You may obtain a copy of the Licence at:
7  *
8  * http://ec.europa.eu/idabc/eupl.html
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the Licence is distributed on an “AS IS” basis, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * Licence permissions and limitations under the Licence.
14  */
15 
24 #pragma once
25 
26 #include <cstdint>
27 
28 extern "C"
29 {
53  auto bactria_metrics_create_sector(char const* name, std::uint32_t type) noexcept -> void*;
54 
66  auto bactria_metrics_destroy_sector(void* sector_handle) noexcept -> void;
67 
81  void* sector_handle,
82  char const* source,
83  std::uint32_t lineno,
84  char const* caller) noexcept -> void;
85 
99  void* sector_handle,
100  char const* source,
101  std::uint32_t lineno,
102  char const* caller) noexcept -> void;
103 
114  auto bactria_metrics_sector_summary(void* sector_handle) noexcept -> void;
115 
125  auto bactria_metrics_create_phase(char const* name) noexcept -> void*;
126 
137  auto bactria_metrics_destroy_phase(void* phase_handle) noexcept -> void;
138 
151  void* phase_handle,
152  char const* source,
153  std::uint32_t lineno,
154  char const* caller) noexcept -> void;
155 
169  void* phase_handle,
170  char const* source,
171  std::uint32_t lineno,
172  char const* caller) noexcept -> void;
173 
177 }
bactria_metrics_enter_phase
auto bactria_metrics_enter_phase(void *phase_handle, char const *source, std::uint32_t lineno, char const *caller) noexcept -> void
Enter a phase.
bactria_metrics_enter_sector
auto bactria_metrics_enter_sector(void *sector_handle, char const *source, std::uint32_t lineno, char const *caller) noexcept -> void
Enter a sector.
bactria_metrics_create_phase
auto bactria_metrics_create_phase(char const *name) noexcept -> void *
Create a phase handle.
bactria_metrics_leave_sector
auto bactria_metrics_leave_sector(void *sector_handle, char const *source, std::uint32_t lineno, char const *caller) noexcept -> void
Leave a sector.
bactria_metrics_sector_summary
auto bactria_metrics_sector_summary(void *sector_handle) noexcept -> void
Summarize a sector.
bactria_metrics_create_sector
auto bactria_metrics_create_sector(char const *name, std::uint32_t type) noexcept -> void *
Creates a sector handle.
bactria_metrics_destroy_phase
auto bactria_metrics_destroy_phase(void *phase_handle) noexcept -> void
Destroy a phase handle.
bactria_metrics_leave_phase
auto bactria_metrics_leave_phase(void *phase_handle, char const *source, std::uint32_t lineno, char const *caller) noexcept -> void
Leave a phase.
bactria_metrics_destroy_sector
auto bactria_metrics_destroy_sector(void *sector_handle) noexcept -> void
Destroys a sector handle.