Search in sources :

Example 11 with StreamsMetrics

use of org.apache.kafka.streams.StreamsMetrics in project kafka by apache.

the class RocksDBWindowStoreSupplierTest method shouldHaveMeteredStoreWhenCached.

@SuppressWarnings("unchecked")
@Test
public void shouldHaveMeteredStoreWhenCached() throws Exception {
    store = createStore(false, true);
    store.init(context, store);
    final StreamsMetrics metrics = context.metrics();
    assertFalse(metrics.metrics().isEmpty());
}
Also used : MockStreamsMetrics(org.apache.kafka.streams.processor.internals.MockStreamsMetrics) StreamsMetrics(org.apache.kafka.streams.StreamsMetrics) Test(org.junit.Test)

Aggregations

StreamsMetrics (org.apache.kafka.streams.StreamsMetrics)11 Test (org.junit.Test)10 MockStreamsMetrics (org.apache.kafka.streams.processor.internals.MockStreamsMetrics)8 Metrics (org.apache.kafka.common.metrics.Metrics)3 NoOpRecordCollector (org.apache.kafka.test.NoOpRecordCollector)3 File (java.io.File)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 MetricName (org.apache.kafka.common.MetricName)1 PartitionInfo (org.apache.kafka.common.PartitionInfo)1 TopicPartition (org.apache.kafka.common.TopicPartition)1 Sensor (org.apache.kafka.common.metrics.Sensor)1 MockTime (org.apache.kafka.common.utils.MockTime)1 StreamsConfig (org.apache.kafka.streams.StreamsConfig)1 ProcessorContext (org.apache.kafka.streams.processor.ProcessorContext)1 StateStore (org.apache.kafka.streams.processor.StateStore)1 TaskId (org.apache.kafka.streams.processor.TaskId)1 InMemoryKeyValueStore (org.apache.kafka.streams.state.internals.InMemoryKeyValueStore)1 OffsetCheckpoint (org.apache.kafka.streams.state.internals.OffsetCheckpoint)1 ThreadCache (org.apache.kafka.streams.state.internals.ThreadCache)1 MockProcessorContext (org.apache.kafka.test.MockProcessorContext)1