![]() |
Shamrock 2025.10.0
Astrophysical Code
|
#include "shambase/SourceLocation.hpp"#include "shambase/aliases_float.hpp"#include "shambase/aliases_int.hpp"#include <optional>#include <string>
Include dependency graph for profiling.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | shambase |
| namespace for basic c++ utilities | |
Functions | |
| bool | shambase::profiling::is_profiling_enabled () |
| Check if profiling is enabled. | |
| void | shambase::profiling::set_enable_nvtx (bool enable_nvtx) |
| Set wether to enable NVTX profiling. | |
| void | shambase::profiling::set_enable_profiling (bool enable_profiling) |
| Set wether to enable profiling. | |
| void | shambase::profiling::set_use_complete_event (bool use_complete_event) |
| Use complete event, or start and begin event in chrome tracing. | |
| void | shambase::profiling::set_event_record_threshold (f64 threshold) |
| Set the event record threshold. | |
| void | shambase::profiling::stack_entry_start (const SourceLocation &fileloc, f64 t_start, const std::optional< std::string > &name=std::nullopt, const std::optional< std::string > &category_name=std::nullopt) |
| Register the start of a profiling event. | |
| void | shambase::profiling::stack_entry_end (const SourceLocation &fileloc, f64 t_start, f64 tend, const std::optional< std::string > &name=std::nullopt, const std::optional< std::string > &category_name=std::nullopt) |
| Register the end of a profiling event. | |
| void | shambase::profiling::stack_entry_start_no_time (const SourceLocation &fileloc, const std::optional< std::string > &name=std::nullopt, const std::optional< std::string > &category_name=std::nullopt) |
| Start a profiling event without a time info. | |
| void | shambase::profiling::stack_entry_end_no_time (const SourceLocation &fileloc, const std::optional< std::string > &name=std::nullopt, const std::optional< std::string > &category_name=std::nullopt) |
| End a profiling event without a time info. | |
| void | shambase::profiling::register_counter_val (const std::string &name, f64 time, f64 val) |
| Register a counter value. | |
Definition in file profiling.hpp.
| bool shambase::profiling::is_profiling_enabled | ( | ) |
Check if profiling is enabled.
Definition at line 94 of file profiling.cpp.
Here is the call graph for this function:Register a counter value.
| name | The name of the counter |
| time | The time of the event |
| val | The value of the counter |
Definition at line 164 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::set_enable_nvtx | ( | bool | enable_nvtx | ) |
Set wether to enable NVTX profiling.
| enable_nvtx | Whether to enable NVTX profiling |
Definition at line 96 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::set_enable_profiling | ( | bool | enable_profiling | ) |
Set wether to enable profiling.
| enable_profiling | Whether to enable profiling |
Definition at line 97 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::set_event_record_threshold | ( | f64 | threshold | ) |
Set the event record threshold.
The threshold is the minimum time in seconds between two events, if the time between two events is smaller than the threshold, the second event will not be recorded.
| threshold | The event record threshold |
Definition at line 99 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::set_use_complete_event | ( | bool | use_complete_event | ) |
Use complete event, or start and begin event in chrome tracing.
| use_complete_event | Whether to use complete events |
Definition at line 98 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::stack_entry_end | ( | const SourceLocation & | fileloc, |
| f64 | t_start, | ||
| f64 | tend, | ||
| const std::optional< std::string > & | name = std::nullopt, |
||
| const std::optional< std::string > & | category_name = std::nullopt |
||
| ) |
Register the end of a profiling event.
| fileloc | The source location of the function |
| t_start | The starting time of the event |
| tend | The ending time of the event |
| name | The name of the event |
| category_name | The name of the category |
Definition at line 117 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::stack_entry_end_no_time | ( | const SourceLocation & | fileloc, |
| const std::optional< std::string > & | name = std::nullopt, |
||
| const std::optional< std::string > & | category_name = std::nullopt |
||
| ) |
End a profiling event without a time info.
| fileloc | The source location of the function |
| name | The name of the event |
| category_name | The name of the category |
Definition at line 151 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::stack_entry_start | ( | const SourceLocation & | fileloc, |
| f64 | t_start, | ||
| const std::optional< std::string > & | name = std::nullopt, |
||
| const std::optional< std::string > & | category_name = std::nullopt |
||
| ) |
Register the start of a profiling event.
| fileloc | The source location of the function |
| t_start | The starting time of the event |
| name | The name of the event |
| category_name | The name of the category |
Definition at line 101 of file profiling.cpp.
Here is the call graph for this function:| void shambase::profiling::stack_entry_start_no_time | ( | const SourceLocation & | fileloc, |
| const std::optional< std::string > & | name = std::nullopt, |
||
| const std::optional< std::string > & | category_name = std::nullopt |
||
| ) |
Start a profiling event without a time info.
| fileloc | The source location of the function |
| name | The name of the event |
| category_name | The name of the category |
Definition at line 138 of file profiling.cpp.
Here is the call graph for this function: