Search in sources :

Example 6 with AgentDigest

use of com.tdunning.math.stats.AgentDigest in project java by wavefrontHQ.

the class AccumulationCacheTest method setup.

@Before
public void setup() {
    backingStore = new ConcurrentHashMap<>();
    tickerTime = new AtomicLong(0L);
    AccumulationCache ac = new AccumulationCache(backingStore, CAPACITY, tickerTime::get);
    resolveTask = ac.getResolveTask();
    cache = ac.getCache();
    digestA = new AgentDigest(COMPRESSION, 100L);
    digestB = new AgentDigest(COMPRESSION, 1000L);
    digestC = new AgentDigest(COMPRESSION, 10000L);
}
Also used : AtomicLong(java.util.concurrent.atomic.AtomicLong) AgentDigest(com.tdunning.math.stats.AgentDigest) Before(org.junit.Before)

Example 7 with AgentDigest

use of com.tdunning.math.stats.AgentDigest in project java by wavefrontHQ.

the class TapeDispatcherTest method setup.

@Before
public void setup() {
    in = new ConcurrentHashMap<>();
    out = new InMemoryObjectQueue<>();
    digestA = new AgentDigest(COMPRESSION, 100L);
    digestB = new AgentDigest(COMPRESSION, 1000L);
    timeMillis = new AtomicLong(0L);
    subject = new TapeDispatcher(in, out, timeMillis::get);
}
Also used : AtomicLong(java.util.concurrent.atomic.AtomicLong) AgentDigest(com.tdunning.math.stats.AgentDigest) Before(org.junit.Before)

Aggregations

AgentDigest (com.tdunning.math.stats.AgentDigest)7 AtomicLong (java.util.concurrent.atomic.AtomicLong)3 Before (org.junit.Before)3 HistogramKey (com.wavefront.agent.histogram.Utils.HistogramKey)2 AccumulationCache (com.wavefront.agent.histogram.accumulator.AccumulationCache)2 AgentDigestMarshaller (com.tdunning.math.stats.AgentDigest.AgentDigestMarshaller)1 PointHandler (com.wavefront.agent.PointHandler)1 MapLoader (com.wavefront.agent.histogram.MapLoader)1 PointHandlerDispatcher (com.wavefront.agent.histogram.PointHandlerDispatcher)1 HistogramKeyMarshaller (com.wavefront.agent.histogram.Utils.HistogramKeyMarshaller)1 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 VanillaChronicleMap (net.openhft.chronicle.map.VanillaChronicleMap)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 ReportPoint (wavefront.report.ReportPoint)1