diff --git a/src/commands/CmdStatistics.cpp b/src/commands/CmdStatistics.cpp index 0578f5c3a..adfbb6c86 100644 --- a/src/commands/CmdStatistics.cpp +++ b/src/commands/CmdStatistics.cpp @@ -73,6 +73,13 @@ int CmdStatistics::execute (std::string& output) if (*tx == "---") ++undoCount; + // Count the backlog transactions. + std::vector backlogTxns = context.tdb2.backlog.get_lines (); + int backlogCount = 0; + for (tx = backlogTxns.begin (); tx != backlogTxns.end (); ++tx) + if ((*tx)[0] == '[') + ++backlogCount; + // Get all the tasks. std::vector all = context.tdb2.all_tasks (); std::vector filtered; @@ -205,6 +212,10 @@ int CmdStatistics::execute (std::string& output) view.set (row, 0, STRING_CMD_STATS_UNDO_TXNS); view.set (row, 1, undoCount); + row = view.addRow (); + view.set (row, 0, STRING_CMD_STATS_BACKLOG); + view.set (row, 1, backlogCount); + if (totalT) { row = view.addRow (); diff --git a/src/en-US.h b/src/en-US.h index cef234dca..144ca6a75 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -249,6 +249,7 @@ #define STRING_CMD_STATS_PROJECTS "Projects" #define STRING_CMD_STATS_DATA_SIZE "Data size" #define STRING_CMD_STATS_UNDO_TXNS "Undo transactions" +#define STRING_CMD_STATS_BACKLOG "Sync backlog transactions" #define STRING_CMD_STATS_TAGGED "Tasks tagged" #define STRING_CMD_STATS_OLDEST "Oldest task" #define STRING_CMD_STATS_NEWEST "Newest task"