mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
reset performance metrics every SizeUp()
This commit is contained in:
parent
a716d766a9
commit
bf2896f33c
1 changed files with 3 additions and 5 deletions
|
@ -655,12 +655,7 @@ public:
|
|||
else if ( space_distance_samples > detail::MIN_SPACE_DISTANCE_SAMPLES &&
|
||||
space_distance_sum > uint64_t(space_distance_samples) * detail::SPACE_DISTANCE_THRESHOLD &&
|
||||
int(num_entries) > detail::MIN_DICT_LOAD_FACTOR_100 * Capacity() / 100 )
|
||||
{
|
||||
SizeUp();
|
||||
// reset performance metrics.
|
||||
space_distance_sum = 0;
|
||||
space_distance_samples = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Remap after insert can adjust asap to shorten period of mixed table.
|
||||
|
@ -1530,6 +1525,9 @@ private:
|
|||
remaps++; // used in Lookup() to cover SizeUp with incomplete remaps.
|
||||
ASSERT(remaps <= log2_buckets); // because we only sizeUp, one direction. we know the
|
||||
// previous log2_buckets.
|
||||
// reset performance metrics.
|
||||
space_distance_sum = 0;
|
||||
space_distance_samples = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue