|
@@ -63,7 +63,7 @@ namespace stats {
|
|
/// either all or nothing. Adding logging entries only when necessary
|
|
/// either all or nothing. Adding logging entries only when necessary
|
|
/// in the code that uses StatsMgr gives better granularity.
|
|
/// in the code that uses StatsMgr gives better granularity.
|
|
///
|
|
///
|
|
-/// If this decision is revisited in the futere, the most universal places
|
|
|
|
|
|
+/// If this decision is revisited in the future, the most universal places
|
|
/// for adding logging have been marked in @ref addValueInternal and
|
|
/// for adding logging have been marked in @ref addValueInternal and
|
|
/// @ref setValueInternal.
|
|
/// @ref setValueInternal.
|
|
class StatsMgr : public boost::noncopyable {
|
|
class StatsMgr : public boost::noncopyable {
|
|
@@ -125,7 +125,7 @@ class StatsMgr : public boost::noncopyable {
|
|
/// @param name name of the observation
|
|
/// @param name name of the observation
|
|
/// @param value duration value observed
|
|
/// @param value duration value observed
|
|
/// @throw InvalidStatType if statistic is not time duration
|
|
/// @throw InvalidStatType if statistic is not time duration
|
|
- void addValue(const std::string& name, const StatsDuration& time);
|
|
|
|
|
|
+ void addValue(const std::string& name, const StatsDuration& value);
|
|
|
|
|
|
/// @brief Records incremental string observation.
|
|
/// @brief Records incremental string observation.
|
|
///
|
|
///
|
|
@@ -256,12 +256,12 @@ class StatsMgr : public boost::noncopyable {
|
|
///
|
|
///
|
|
/// @param name name of the command (ignored, should be "statistic-get")
|
|
/// @param name name of the command (ignored, should be "statistic-get")
|
|
/// @param params structure containing a map that contains "name"
|
|
/// @param params structure containing a map that contains "name"
|
|
- /// @param return answer containing details of specified statistic
|
|
|
|
|
|
+ /// @return answer containing details of specified statistic
|
|
static isc::data::ConstElementPtr
|
|
static isc::data::ConstElementPtr
|
|
statisticGetHandler(const std::string& name,
|
|
statisticGetHandler(const std::string& name,
|
|
const isc::data::ConstElementPtr& params);
|
|
const isc::data::ConstElementPtr& params);
|
|
|
|
|
|
- /// @param Handles statistic-reset command
|
|
|
|
|
|
+ /// @brief Handles statistic-reset command
|
|
///
|
|
///
|
|
/// This method handles statistic-reset command, which resets value
|
|
/// This method handles statistic-reset command, which resets value
|
|
/// of a given statistic. It expects one parameter stored in params map:
|
|
/// of a given statistic. It expects one parameter stored in params map:
|
|
@@ -274,12 +274,12 @@ class StatsMgr : public boost::noncopyable {
|
|
///
|
|
///
|
|
/// @param name name of the command (ignored, should be "statistic-reset")
|
|
/// @param name name of the command (ignored, should be "statistic-reset")
|
|
/// @param params structure containing a map that contains "name"
|
|
/// @param params structure containing a map that contains "name"
|
|
- /// @param return answer containing confirmation
|
|
|
|
|
|
+ /// @return answer containing confirmation
|
|
static isc::data::ConstElementPtr
|
|
static isc::data::ConstElementPtr
|
|
statisticResetHandler(const std::string& name,
|
|
statisticResetHandler(const std::string& name,
|
|
const isc::data::ConstElementPtr& params);
|
|
const isc::data::ConstElementPtr& params);
|
|
|
|
|
|
- /// @param Handles statistic-remove command
|
|
|
|
|
|
+ /// @brief Handles statistic-remove command
|
|
///
|
|
///
|
|
/// This method handles statistic-reset command, which removes a given
|
|
/// This method handles statistic-reset command, which removes a given
|
|
/// statistic completely. It expects one parameter stored in params map:
|
|
/// statistic completely. It expects one parameter stored in params map:
|
|
@@ -292,7 +292,7 @@ class StatsMgr : public boost::noncopyable {
|
|
///
|
|
///
|
|
/// @param name name of the command (ignored, should be "statistic-remove")
|
|
/// @param name name of the command (ignored, should be "statistic-remove")
|
|
/// @param params structure containing a map that contains "name" element
|
|
/// @param params structure containing a map that contains "name" element
|
|
- /// @param return answer containing confirmation
|
|
|
|
|
|
+ /// @return answer containing confirmation
|
|
static isc::data::ConstElementPtr
|
|
static isc::data::ConstElementPtr
|
|
statisticRemoveHandler(const std::string& name,
|
|
statisticRemoveHandler(const std::string& name,
|
|
const isc::data::ConstElementPtr& params);
|
|
const isc::data::ConstElementPtr& params);
|
|
@@ -304,7 +304,7 @@ class StatsMgr : public boost::noncopyable {
|
|
///
|
|
///
|
|
/// @param name name of the command (ignored, should be "statistic-get-all")
|
|
/// @param name name of the command (ignored, should be "statistic-get-all")
|
|
/// @param params ignored
|
|
/// @param params ignored
|
|
- /// @param return answer containing values of all statistic
|
|
|
|
|
|
+ /// @return answer containing values of all statistic
|
|
static isc::data::ConstElementPtr
|
|
static isc::data::ConstElementPtr
|
|
statisticGetAllHandler(const std::string& name,
|
|
statisticGetAllHandler(const std::string& name,
|
|
const isc::data::ConstElementPtr& params);
|
|
const isc::data::ConstElementPtr& params);
|
|
@@ -316,7 +316,7 @@ class StatsMgr : public boost::noncopyable {
|
|
///
|
|
///
|
|
/// @param name name of the command (ignored, should be "statistic-reset-all")
|
|
/// @param name name of the command (ignored, should be "statistic-reset-all")
|
|
/// @param params ignored
|
|
/// @param params ignored
|
|
- /// @param return answer confirming success of this operation
|
|
|
|
|
|
+ /// @return answer confirming success of this operation
|
|
static isc::data::ConstElementPtr
|
|
static isc::data::ConstElementPtr
|
|
statisticResetAllHandler(const std::string& name,
|
|
statisticResetAllHandler(const std::string& name,
|
|
const isc::data::ConstElementPtr& params);
|
|
const isc::data::ConstElementPtr& params);
|
|
@@ -328,7 +328,7 @@ class StatsMgr : public boost::noncopyable {
|
|
///
|
|
///
|
|
/// @param name name of the command (ignored, should be "statistic-remove-all")
|
|
/// @param name name of the command (ignored, should be "statistic-remove-all")
|
|
/// @param params ignored
|
|
/// @param params ignored
|
|
- /// @param return answer confirming success of this operation
|
|
|
|
|
|
+ /// @return answer confirming success of this operation
|
|
static isc::data::ConstElementPtr
|
|
static isc::data::ConstElementPtr
|
|
statisticRemoveAllHandler(const std::string& name,
|
|
statisticRemoveAllHandler(const std::string& name,
|
|
const isc::data::ConstElementPtr& params);
|
|
const isc::data::ConstElementPtr& params);
|
|
@@ -337,6 +337,7 @@ class StatsMgr : public boost::noncopyable {
|
|
|
|
|
|
private:
|
|
private:
|
|
|
|
|
|
|
|
+ /// @anchor setValueInternal
|
|
/// @brief Sets a given statistic to specified value (internal version).
|
|
/// @brief Sets a given statistic to specified value (internal version).
|
|
///
|
|
///
|
|
/// This template method sets statistic identified by name to a value
|
|
/// This template method sets statistic identified by name to a value
|
|
@@ -360,6 +361,7 @@ class StatsMgr : public boost::noncopyable {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// @anchor addValueInternal
|
|
/// @brief Adds specified value to a given statistic (internal version).
|
|
/// @brief Adds specified value to a given statistic (internal version).
|
|
///
|
|
///
|
|
/// This template method adds specified value to a given statistic (identified
|
|
/// This template method adds specified value to a given statistic (identified
|
|
@@ -393,6 +395,7 @@ class StatsMgr : public boost::noncopyable {
|
|
/// method.
|
|
/// method.
|
|
StatsMgr();
|
|
StatsMgr();
|
|
|
|
|
|
|
|
+ /// @anchor addObservation
|
|
/// @brief Adds a new observation.
|
|
/// @brief Adds a new observation.
|
|
///
|
|
///
|
|
/// That's an utility method used by public @ref setValue() and
|
|
/// That's an utility method used by public @ref setValue() and
|