| 226 | } |
| 227 | |
| 228 | void HashTableCtx::StatsCountersAdd(HashTableStatsProfile* profile) { |
| 229 | DCHECK(profile != nullptr); |
| 230 | if (profile == nullptr) { |
| 231 | LOG(WARNING) << "In HashTableCtx::StatsCountersAdd() 'profile is NULL.'"; |
| 232 | return; |
| 233 | } |
| 234 | COUNTER_ADD(profile->num_hash_collisions_, num_hash_collisions_); |
| 235 | COUNTER_ADD(profile->num_hash_probes_, num_probes_); |
| 236 | COUNTER_ADD(profile->num_hash_travels_, travel_length_); |
| 237 | } |
| 238 | |
| 239 | uint32_t HashTableCtx::Hash(const void* input, int len, uint32_t hash) const { |
| 240 | /// Use CRC hash at first level for better performance. Switch to murmur hash at |