rtabmap-report: added loc_delay option. Db info: added unused space

This commit is contained in:
matlabbe
2020-09-03 15:23:48 -04:00
parent 23d8353540
commit 1db17dd118
3 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -2038,7 +2038,7 @@ void DatabaseViewer::updateInfo()
total+=mem;
ui_->textEdit_info->append(tr("Statistics size:\t%1 %2\t%3%").arg(mem>1000000?mem/1000000:mem>1000?mem/1000:mem).arg(mem>1000000?"MB":mem>1000?"KB":"Bytes").arg(dbSize>0?QString::number(double(mem)/double(dbSize)*100.0, 'f', 2 ):"0"));
mem = dbSize - total;
ui_->textEdit_info->append(tr("Other (indexing):\t%1 %2\t%3%").arg(mem>1000000?mem/1000000:mem>1000?mem/1000:mem).arg(mem>1000000?"MB":mem>1000?"KB":"Bytes").arg(dbSize>0?QString::number(double(mem)/double(dbSize)*100.0, 'f', 2 ):"0"));
ui_->textEdit_info->append(tr("Other (indexing, unused):\t%1 %2\t%3%").arg(mem>1000000?mem/1000000:mem>1000?mem/1000:mem).arg(mem>1000000?"MB":mem>1000?"KB":"Bytes").arg(dbSize>0?QString::number(double(mem)/double(dbSize)*100.0, 'f', 2 ):"0"));
ui_->textEdit_info->append("");
std::set<int> idsWithoutBad;
dbDriver_->getAllNodeIds(idsWithoutBad, false, true);
+1 -1
View File
@@ -379,7 +379,7 @@ int main(int argc, char * argv[])
total+=mem;
std::cout << (uFormat("%s%d %s\t(%.2f%%)\n", pad("Statistics size:").c_str(), mem>1000000?mem/1000000:mem>1000?mem/1000:mem, mem>1000000?"MB":mem>1000?"KB":"Bytes", dbSize>0?double(mem)/double(dbSize)*100.0:0.0));
mem = dbSize - total;
std::cout << (uFormat("%s%d %s\t(%.2f%%)\n", pad("Other (indexing):").c_str(), mem>1000000?mem/1000000:mem>1000?mem/1000:mem, mem>1000000?"MB":mem>1000?"KB":"Bytes", dbSize>0?double(mem)/double(dbSize)*100.0:0.0));
std::cout << (uFormat("%s%d %s\t(%.2f%%)\n", pad("Other (indexing, unused):").c_str(), mem>1000000?mem/1000000:mem>1000?mem/1000:mem, mem>1000000?"MB":mem>1000?"KB":"Bytes", dbSize>0?double(mem)/double(dbSize)*100.0:0.0));
std::cout << ("\n");
}
+6 -4
View File
@@ -71,8 +71,9 @@ void showUsage()
" --start # Start from this node ID for the figures.\n"
#endif
" --report Export all evaluation statistics values in report.txt \n"
" --loc # Show localization statistics for each \"Statistic/Id\" per "
" session for 1=min,2=max,4=mean,8=stddev,16=total,32=nonnull%% "
" --loc # Show localization statistics for each \"Statistic/Id\" per\n"
" session for 1=min,2=max,4=mean,8=stddev,16=total,32=nonnull%%\n"
" --loc_delay # Delay to split sessions for localization statistics (default 60 seconds)\n"
" (it is a mask, we can combine those numbers, e.g., 63 for all) \n"
" --help Show usage\n\n");
exit(1);
@@ -134,6 +135,7 @@ int main(int argc, char * argv[])
bool useIds = false;
int startId = 0;
int showLoc = 0;
float locDelay = 60;
std::vector<std::string> statsToShow;
#ifdef WITH_QT
std::map<std::string, UPlot*> figures;
@@ -276,7 +278,6 @@ int main(int argc, char * argv[])
if(UFile::getExtension(currentPath).compare("db") == 0)
{
currentPathIsDatabase=true;
localizationMultiStats.clear();
printf("Database: %s\n", currentPath.c_str());
}
else
@@ -318,6 +319,7 @@ int main(int argc, char * argv[])
if(currentPathIsDatabase)
{
filePath = currentPath;
fileName = UFile::getName(currentPath);
}
else
{
@@ -531,7 +533,7 @@ int main(int argc, char * argv[])
if(!localizationMultiStats.empty())
{
if(previousStamp > 0 && s - previousStamp > 10 && uContains(localizationSessionStats, jter->first))
if(previousStamp > 0 && s - previousStamp > locDelay && uContains(localizationSessionStats, jter->first))
{
// changed session
LocStats values = LocStats::from(localizationSessionStats.at(jter->first));