Esempio n. 1
0
        public void CanSetBeaconCacheUpperMemoryBoundaryForDynatrace()
        {
            // given
            var        target = new DynatraceOpenKitBuilder(Endpoint, AppID, DeviceID);
            const long upperMemoryBoundary = 42L * 1024L;

            // when
            var obtained = target.WithBeaconCacheUpperMemoryBoundary(upperMemoryBoundary);
            var config   = target.BuildConfiguration().BeaconCacheConfig;

            // then
            Assert.That(obtained, Is.InstanceOf <DynatraceOpenKitBuilder>());
            Assert.That((DynatraceOpenKitBuilder)obtained, Is.SameAs(target));
            Assert.That(config.CacheSizeUpperBound, Is.EqualTo(upperMemoryBoundary));
        }
 /// <summary>
 /// Sets the upper memory boundary of the beacon cache.
 ///
 /// When this is set to a positive value the memory based eviction strategy starts to clear
 /// data from the beacon cache when the cache size exceeds this setting.
 ///
 /// </summary>
 /// <param name="upperMemoryBoundary">The upper boundary of the beacon cache or negative if unlimited.</param>
 /// <returns><code>this</code></returns>
 public DynatraceOpenKitBuilderVB WithBeaconCacheUpperMemoryBoundary(long upperMemoryBoundary)
 {
     wrappedBuilder.WithBeaconCacheUpperMemoryBoundary(upperMemoryBoundary);
     return(this);
 }