reference_system_py::benchmark
Functions
Name
def
terminatingRos2Run (pkg pkg, executable executable, rmw rmw, env env =os.environ, args args =[], ** kwargs)
def
setup_benchmark_directory (pkg pkg, create create =False)
def
roudi_daemon (env env =os.environ, roudi_config_path roudi_config_path =None)
def
get_benchmark_directory (base_directory base_directory, executable executable, runtime_sec runtime_sec, rmw rmw, create create =False)
def
get_benchmark_directories_below (base_directory base_directory, runtime_sec runtime_sec =None)
def
generate_trace (trace_type trace_type, * args, ** kwargs)
def
generate_std_trace (executable executable, pkg pkg, directory directory, runtime_sec runtime_sec, rmw rmw)
def
generate_memory_trace (executable executable, pkg pkg, directory directory, runtime_sec runtime_sec, rmw rmw)
def
generate_callback_trace (executable executable, pkg pkg, directory directory, runtime_sec runtime_sec, rmw rmw)
def
available_executables (pkg pkg, pattern pattern =' *')
Attributes
Functions Documentation
function terminatingRos2Run
def terminatingRos2Run(
pkg pkg,
executable executable,
rmw rmw,
env env =os.environ,
args args =[],
** kwargs
)
Run the given executable (part of the given package) under the given rmw.
The executable is automatically terminated upon exit from the context
function setup_benchmark_directory
def setup_benchmark_directory(
pkg pkg,
create create =False
)
function roudi_daemon
def roudi_daemon(
env env =os.environ,
roudi_config_path roudi_config_path =None
)
Context manager that runs a RouDi instance for the duration of the context.
The `env` parameter specifies environment variables for the RouDi process.
The `roudi_config_path` parameter can be used to provide a RouDi toml configuration file.
function get_benchmark_directory
def get_benchmark_directory(
base_directory base_directory,
executable executable,
runtime_sec runtime_sec,
rmw rmw,
create create =False
)
Return the directory to place measurements and reports for the given experiment.
If `create` is True, the directory is created if it does not exist yet.
function get_benchmark_directories_below
def get_benchmark_directories_below(
base_directory base_directory,
runtime_sec runtime_sec =None
)
Return all benchmark directories found below `base_directory`.```
### function generate_trace
```python
def generate_trace(
trace_type trace_type,
* args,
** kwargs
)
function generate_std_trace
def generate_std_trace(
executable executable,
pkg pkg,
directory directory,
runtime_sec runtime_sec,
rmw rmw
)
Generate a tracefile for the given executable using the 'std' method.
The 'std' method logs stdout of the executable.
function generate_memory_trace
def generate_memory_trace(
executable executable,
pkg pkg,
directory directory,
runtime_sec runtime_sec,
rmw rmw
)
Generate a tracefile for the given executable using the 'memory' method.
The 'memory' method uses `psrecord` to profile memory and CPU usage.
function generate_callback_trace
def generate_callback_trace(
executable executable,
pkg pkg,
directory directory,
runtime_sec runtime_sec,
rmw rmw
)
Generate a tracefile for the given executable using the 'callback' method.
The 'callback' method measures the executable using 'ros2 trace'
function available_executables
def available_executables(
pkg pkg,
pattern pattern =' *'
)
Attributes Documentation
bool tracetools_available = True;
variable ROS_HOME
ROS_HOME = Path(os.environ.get('ROS_HOME', os.environ['HOME']+'/.ros'));
variable REFERENCE_SYSTEM_SHARE_DIR
REFERENCE_SYSTEM_SHARE_DIR = Path(get_package_share_directory('reference_system'));
Updated on 2023-09-17 at 15:43:17 +0000