Skip to main content

LatencyWindow Class

Seam-lead estimate over the last kLatencyWindowSize inference round trips: their max, floored. More...

Declaration

class moveit_pro::behaviors::internal::LatencyWindow { ... }

Included Headers

#include <execute_policy.hpp>

Public Constructors Index

LatencyWindow (const double latency_floor, const double seed)

Public Member Functions Index

voidpush (const double sample)
doubleestimate () const

Private Member Attributes Index

doublefloor_
std::array< double, kLatencyWindowSize >samples_ {}
std::size_tnext_index_ = 0

Description

Seam-lead estimate over the last kLatencyWindowSize inference round trips: their max, floored.

A window max recovers after a latency spike, unlike a high-water mark, and an undershoot costs a pause at rest rather than the run. The seed fills every slot, so it acts as the estimate until real round trips age it out.

warning

Not thread-safe: push() and estimate() share unguarded state.

Definition at line 113 of file execute_policy.hpp.

Public Constructors

LatencyWindow()

moveit_pro::behaviors::internal::LatencyWindow::LatencyWindow (const double latency_floor, const double seed)
inline

Definition at line 116 of file execute_policy.hpp.

Public Member Functions

estimate()

double moveit_pro::behaviors::internal::LatencyWindow::estimate ()
inline

Definition at line 127 of file execute_policy.hpp.

push()

void moveit_pro::behaviors::internal::LatencyWindow::push (const double sample)
inline

Definition at line 121 of file execute_policy.hpp.

Private Member Attributes

floor_

double moveit_pro::behaviors::internal::LatencyWindow::floor_

Definition at line 133 of file execute_policy.hpp.

next_index_

std::size_t moveit_pro::behaviors::internal::LatencyWindow::next_index_ = 0

Definition at line 135 of file execute_policy.hpp.

samples_

std::array<double, kLatencyWindowSize> moveit_pro::behaviors::internal::LatencyWindow::samples_ {}

Definition at line 134 of file execute_policy.hpp.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.