public void BitPseudoLru_cache_half(Test t) { var cache = new BitPseudoLruMap <string, string>(valueIsKey.WithThunderingHerdProtection(), keys.Length / 2); ReadMixKeys(keys, cache, t); Console.WriteLine($"BitPseudoLru half {valueIsKey.HitCount} hits to underlying data source, {pm.Stop()}"); GC.KeepAlive(cache); GC.KeepAlive(keys); }
public void BitPseudoLru_cache_half(Test t) { foreach (var items in testSizes) { string[] keys = CreateKeyStrings(items); var pm = new PerformaceMonitor(start: true); var cache = new BitPseudoLruMap <string, string>(valueIsKey, items / 2); ReadMixKeys(keys, cache, t); pm.Stop(); t.Log($"BitPseudoLru_cache_half of {items} items {pm.Stop()}"); GC.KeepAlive(cache); GC.KeepAlive(keys); } }