| 672 | } |
| 673 | |
| 674 | bool TopNNode::Heap::DCheckConsistency() { |
| 675 | DCHECK_LE(num_tuples(), capacity_ + overflowed_ties_.size()) |
| 676 | << num_tuples() << " > " << capacity_ << " + " << overflowed_ties_.size(); |
| 677 | if (!overflowed_ties_.empty()) { |
| 678 | DCHECK(include_ties_); |
| 679 | DCHECK_EQ(capacity_, priority_queue_.Size()) |
| 680 | << "Ties should only be present if heap is at capacity"; |
| 681 | } |
| 682 | return true; |
| 683 | } |
| 684 | |
| 685 | Status TopNNode::ReclaimTuplePool(RuntimeState* state) { |
| 686 | COUNTER_ADD(tuple_pool_reclaim_counter_, 1); |
no test coverage detected