BasicLinkedList::operator<<: Count elements in seqlist 65/77265/2
authorDave Rigby <daver@couchbase.com>
Fri, 21 Apr 2017 16:07:46 +0000 (17:07 +0100)
committerDave Rigby <daver@couchbase.com>
Thu, 27 Apr 2017 20:28:31 +0000 (20:28 +0000)
Change-Id: I3b66dee8122d54aa328941982700b6d07e5daa99
Reviewed-on: http://review.couchbase.org/77265
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
src/linked_list.cc

index 0ae1e6a..05c2141 100644 (file)
@@ -353,10 +353,12 @@ std::ostream& operator <<(std::ostream& os, const BasicLinkedList& ll) {
        << " staleItems:" << ll.getNumStaleItems()
        << " highPurgeSeqno:" << ll.getHighestPurgedDeletedSeqno()
        << " elements:[" << std::endl;
+    size_t count = 0;
     for (const auto& val : ll.seqList) {
         os << "    " << val << std::endl;
+        ++count;
     }
-    os << "]";
+    os << "] (count:" << count << ")";
     return os;
 }