diff options
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r-- | common/storage_lmdb.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index 514a4ea..4e7f322 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -732,7 +732,7 @@ QList<QByteArray> DataStore::Transaction::getDatabaseNames() const | |||
732 | } | 732 | } |
733 | 733 | ||
734 | 734 | ||
735 | DataStore::Transaction::Stat DataStore::Transaction::stat() | 735 | DataStore::Transaction::Stat DataStore::Transaction::stat(bool printDetails) |
736 | { | 736 | { |
737 | const int freeDbi = 0; | 737 | const int freeDbi = 0; |
738 | const int mainDbi = 1; | 738 | const int mainDbi = 1; |
@@ -779,14 +779,16 @@ DataStore::Transaction::Stat DataStore::Transaction::stat() | |||
779 | pg += span; | 779 | pg += span; |
780 | for (; i >= span && iptr[i-span] == pg; span++, pg++) ; | 780 | for (; i >= span && iptr[i-span] == pg; span++, pg++) ; |
781 | } | 781 | } |
782 | std::cout << " Transaction " << *(size_t *)key.mv_data << ", "<< j << " pages, maxspan " << span << (bad ? " [bad sequence]" : "") << std::endl; | 782 | if (printDetails) { |
783 | for (--j; j >= 0; ) { | 783 | std::cout << " Transaction " << *(size_t *)key.mv_data << ", "<< j << " pages, maxspan " << span << (bad ? " [bad sequence]" : "") << std::endl; |
784 | pg = iptr[j]; | 784 | for (--j; j >= 0; ) { |
785 | for (span=1; --j >= 0 && iptr[j] == pg+span; span++); | 785 | pg = iptr[j]; |
786 | if (span > 1) { | 786 | for (span=1; --j >= 0 && iptr[j] == pg+span; span++); |
787 | std::cout << " " << pg << "[" << span << "]\n"; | 787 | if (span > 1) { |
788 | } else { | 788 | std::cout << " " << pg << "[" << span << "]\n"; |
789 | std::cout << " " << pg << std::endl; | 789 | } else { |
790 | std::cout << " " << pg << std::endl; | ||
791 | } | ||
790 | } | 792 | } |
791 | } | 793 | } |
792 | } | 794 | } |