// $Id$
//
-// Copyright (C) 2008
+// Copyright (C) 2008
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
#include "Range.hh"
#define prefix_ inline
-///////////////////////////////cci.p///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::StatisticsBase::Transform
prefix_ senf::StatisticsBase::Transform::result_type
return i.second;
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::StatisticsBase::OutputEntry
prefix_ senf::StatisticsBase::OutputEntry::OutputEntry()
prefix_ void senf::StatisticsBase::OutputEntry::initDir()
{
- dir.add("list", senf::membind(&OutputEntry::consoleList, this))
- .doc("List all known connected targets. This list might not be complete.");
+ namespace fty = senf::console::factory;
+
+ dir.add("list", fty::Command(&OutputEntry::consoleList, this)
+ .doc("List all known connected targets. This list might not be complete.") );
}
prefix_ senf::StatisticsBase::OutputEntry &
os << i->label << "\n";
}
-/////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::StatisticsBase
prefix_ senf::StatisticsBase::StatisticsBase()
- : min_ (0.0f), avg_ (0.0f), max_ (0.0f), maxQueueLen_ (0u)
+ : min_ (0.0f), avg_ (0.0f), max_ (0.0f), dev_ (0.0f), maxQueueLen_ (0u)
{}
prefix_ senf::StatisticsBase::~StatisticsBase()
return v_path();
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::Collector
prefix_ senf::Collector::Collector(StatisticsBase * owner, unsigned rank)
return StatisticsBase::OutputProxy<Collector>(this, StatisticsBase::output(n));
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::Statistics
+prefix_ void senf::Statistics::operator()(unsigned n, float min, float avg, float max,
+ float dev)
+{
+ enter(n, min, avg, max, dev);
+}
+
prefix_ void senf::Statistics::operator()(float min, float avg, float max, float dev)
{
- enter(min, avg, max, dev);
+ enter(1, min, avg, max, dev);
}
prefix_ void senf::Statistics::operator()(float value, float dev)
{
- enter(value, value, value, dev);
+ enter(1, value, value, value, dev);
}
+
prefix_ senf::StatisticsBase::OutputProxy<senf::Statistics>
senf::Statistics::output(unsigned n)
{
return StatisticsBase::OutputProxy<Statistics>(this, StatisticsBase::output(n));
}
-///////////////////////////////cci.e///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#undef prefix_
\f