42 const std::string& string_prefix,
46 stat.
add(string_prefix +
" (Avg.)", accumulator.
mean());
47 if (accumulator.
mean() != 0.0) {
48 stat.
add(string_prefix +
" (Avg., fps)", 1.0 / accumulator.
mean());
50 stat.
add(string_prefix +
" (Max)", accumulator.
max());
51 stat.
add(string_prefix +
" (Min)", accumulator.
min());
52 stat.
add(string_prefix +
" (Var.)", accumulator.
variance());
56 const std::string& string_prefix,
61 diagnostic_msgs::DiagnosticStatus::ERROR,
62 (boost::format(
"%s not running for %f sec")
63 % string_prefix % vital_checker->deadSec()).
str());
67 const std::string& string_prefix,
72 stat.
add(string_prefix,
"True");
75 stat.
add(string_prefix,
"False");
void summary(unsigned char lvl, const std::string s)
void add(const std::string &key, const T &val)