mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
More stats collection extensions.
This commit is contained in:
parent
6d836b7956
commit
3c71d4ffa8
8 changed files with 47 additions and 10 deletions
|
@ -13,7 +13,7 @@ PriorityQueue::PriorityQueue(int initial_size)
|
|||
{
|
||||
max_heap_size = initial_size;
|
||||
heap = new PQ_Element*[max_heap_size];
|
||||
peak_heap_size = heap_size = 0;
|
||||
peak_heap_size = heap_size = cumulative_num = 0;
|
||||
}
|
||||
|
||||
PriorityQueue::~PriorityQueue()
|
||||
|
@ -62,6 +62,7 @@ int PriorityQueue::Add(PQ_Element* e)
|
|||
|
||||
BubbleUp(heap_size);
|
||||
|
||||
++cumulative_num;
|
||||
if ( ++heap_size > peak_heap_size )
|
||||
peak_heap_size = heap_size;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue