Skip to content
Snippets Groups Projects
Commit 6aafd21d authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Move src/success-bin.cc -> include/hpp/statistics/success-bin.hxx

parent ddb4b126
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,11 @@ namespace hpp {
/// Count the number of a particular failure.
std::size_t nbFailure (const SuccessBin::Reason& r) const;
#ifdef HPP_DEBUG
/// If nbSuccess() * logRatio < numberOfObservations(), write to log.
float logRatio;
#endif
};
} // namespace statistics
} // namespace hpp
......
......@@ -36,11 +36,6 @@ namespace hpp {
reason_ = REASON_SUCCESS;
}
bool SuccessBin::isSuccess () const
{
return success_;
}
std::ostream& SuccessBin::printValue (std::ostream& os) const
{
os << "Event ";
......@@ -49,11 +44,6 @@ namespace hpp {
return os;
}
const SuccessBin::Reason& SuccessBin::reason () const
{
return reason_;
}
bool SuccessBin::operator == (const SuccessBin& other) const
{
return reason_.id == other.reason().id;
......@@ -70,6 +60,10 @@ namespace hpp {
void SuccessStatistics::addFailure (const SuccessBin::Reason& r)
{
insert (SuccessBin (false, r));
#ifdef HPP_DEBUG
if (logRatio * nbSuccess () < numberOfObservations())
hppDout (info, *this);
#endif
}
void SuccessStatistics::addSuccess ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment