Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Functions
chrome.hpp File Reference
#include "shambase/aliases_float.hpp"
#include "shambase/aliases_int.hpp"
#include <string>
+ Include dependency graph for chrome.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

void shambase::profiling::chrome::set_chrome_pid (u32 pid)
 Set the Chrome tracing process id.
 
void shambase::profiling::chrome::set_time_offset (f64 offset)
 Set the time offset used for Chrome tracing.
 
void shambase::profiling::chrome::register_event_start (const std::string &name, const std::string &category_name, f64 t_start, u64 pid, u64 tid)
 Register the start of an event in Chrome tracing.
 
void shambase::profiling::chrome::register_event_end (const std::string &name, const std::string &category_name, f64 tend, u64 pid, u64 tid)
 Register the end of an event in Chrome tracing.
 
void shambase::profiling::chrome::register_event_complete (const std::string &name, const std::string &category_name, f64 t_start, f64 tend, u64 pid, u64 tid)
 Register a complete event in Chrome tracing.
 
void shambase::profiling::chrome::register_metadata_thread_name (u64 pid, u64 tid, const std::string &name)
 Register a thread name in Chrome tracing.
 
void shambase::profiling::chrome::register_counter_val (u64 pid, f64 t, const std::string &name, f64 val)
 Register a counter value in Chrome tracing.
 

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file chrome.hpp.

Function Documentation

◆ register_counter_val()

void shambase::profiling::chrome::register_counter_val ( u64  pid,
f64  t,
const std::string &  name,
f64  val 
)

Register a counter value in Chrome tracing.

This registers a counter value in Chrome tracing. It is used to record a value of a counter in the trace.

Parameters
pidThe process id of the counter
tThe time of the counter
nameThe name of the counter
valThe value of the counter

Definition at line 225 of file chrome.cpp.

+ Here is the call graph for this function:

◆ register_event_complete()

void shambase::profiling::chrome::register_event_complete ( const std::string &  name,
const std::string &  category_name,
f64  t_start,
f64  tend,
u64  pid,
u64  tid 
)

Register a complete event in Chrome tracing.

This registers a complete event in Chrome tracing. It is used to register an event with both its start and end times.

Parameters
nameThe name of the event
category_nameThe category name of the event
t_startThe start time of the event
tendThe end time of the event
pidThe process id of the event
tidThe thread id of the event

Definition at line 208 of file chrome.cpp.

+ Here is the call graph for this function:

◆ register_event_end()

void shambase::profiling::chrome::register_event_end ( const std::string &  name,
const std::string &  category_name,
f64  tend,
u64  pid,
u64  tid 
)

Register the end of an event in Chrome tracing.

This registers the end of an event in Chrome tracing. It is used to mark the end of an event in the trace.

Parameters
nameThe name of the event
category_nameThe category name of the event
tendThe end time of the event
pidThe process id of the event
tidThe thread id of the event

Definition at line 203 of file chrome.cpp.

+ Here is the call graph for this function:

◆ register_event_start()

void shambase::profiling::chrome::register_event_start ( const std::string &  name,
const std::string &  category_name,
f64  t_start,
u64  pid,
u64  tid 
)

Register the start of an event in Chrome tracing.

This registers the start of an event in Chrome tracing. It is used to mark the beginning of an event in the trace.

Parameters
nameThe name of the event
category_nameThe category name of the event
t_startThe start time of the event
pidThe process id of the event
tidThe thread id of the event

Definition at line 197 of file chrome.cpp.

+ Here is the call graph for this function:

◆ register_metadata_thread_name()

void shambase::profiling::chrome::register_metadata_thread_name ( u64  pid,
u64  tid,
const std::string &  name 
)

Register a thread name in Chrome tracing.

This registers a thread name in Chrome tracing. It is used to give a name to a thread in the trace.

Parameters
pidThe process id of the thread
tidThe thread id of the thread
nameThe name of the thread

Definition at line 220 of file chrome.cpp.

+ Here is the call graph for this function:

◆ set_chrome_pid()

void shambase::profiling::chrome::set_chrome_pid ( u32  pid)

Set the Chrome tracing process id.

This sets the process id used by the Chrome tracing library. It should be set to the value of the MPI world rank.

Parameters
pidThe process id

Definition at line 32 of file chrome.cpp.

+ Here is the call graph for this function:

◆ set_time_offset()

void shambase::profiling::chrome::set_time_offset ( f64  offset)

Set the time offset used for Chrome tracing.

This sets the time offset used for Chrome tracing. It is used to adjust the times of the events so that they are correctly aligned with the times of the other events in the trace.

Parameters
offsetThe time offset

Definition at line 30 of file chrome.cpp.

+ Here is the call graph for this function: