Enhancement - stats report

- Rearranged sequence of stats report to make more sense, with
  counts first and statistics (derived data) last.
This commit is contained in:
Paul Beckingham 2009-04-12 02:10:05 -04:00
parent e0fd39db7b
commit 01e5e773eb

View file

@ -1792,6 +1792,13 @@ std::string handleReportStats (TDB& tdb, T& task, Config& conf)
<< "Deleted " << deletedT << std::endl << "Deleted " << deletedT << std::endl
<< "Total " << totalT << std::endl; << "Total " << totalT << std::endl;
out << "Annotations " << annotationsT << std::endl;
out << "Unique tags " << allTags.size () << std::endl;
out << "Projects " << allProjects.size () << std::endl;
if (totalT)
out << "Tasks tagged " << std::setprecision (3) << (100.0 * taggedT / totalT) << "%" << std::endl;
if (tasks.size ()) if (tasks.size ())
{ {
Date e (earliest); Date e (earliest);
@ -1816,14 +1823,7 @@ std::string handleReportStats (TDB& tdb, T& task, Config& conf)
<< std::endl; << std::endl;
if (totalT) if (totalT)
{
out << "Average desc length " << (int) (descLength / totalT) << " characters" << std::endl; out << "Average desc length " << (int) (descLength / totalT) << " characters" << std::endl;
out << "Tasks tagged " << std::setprecision (3) << (100.0 * taggedT / totalT) << "%" << std::endl;
}
out << "Annotations " << annotationsT << std::endl;
out << "Unique tags " << allTags.size () << std::endl;
out << "Projects " << allProjects.size () << std::endl;
return out.str (); return out.str ();
} }