test_class.declarator: stream
test_class.original_string: RollingThreadPoolMaxConcurrencyStream stream;
test_class.type: RollingThreadPoolMaxConcurrencyStream
test_class.var_name: stream
test_class.declarator: context
test_class.original_string: HystrixRequestContext context;
test_class.type: HystrixRequestContext
test_class.var_name: context
test_class.declarator: threadPool
test_class.original_string: ExecutorService threadPool;
test_class.type: ExecutorService
test_class.var_name: threadPool
test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/metric/consumer/RollingThreadPoolMaxConcurrencyStreamTest.java
test_class.identifier: RollingThreadPoolMaxConcurrencyStreamTest
test_class.superclass: extends CommandStreamTest
test_case.body: @Test
      public void testConcurrencyStreamProperlyFiltersOutResponseFromCache() throws InterruptedException {
          HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.asKey("ThreadPool-Concurrency-G");
          HystrixThreadPoolKey threadPoolKey = HystrixThreadPoolKey.Factory.asKey("ThreadPool-Concurrency-G");
          HystrixCommandKey key = HystrixCommandKey.Factory.asKey("RollingConcurrency-G");
          stream = RollingThreadPoolMaxConcurrencyStream.getInstance(threadPoolKey, 10, 100);
          stream.startCachingStreamValuesIfUnstarted();
  
          final CountDownLatch latch = new CountDownLatch(1);
          stream.observe().take(10).subscribe(getSubscriber(latch));
  
          Command cmd1 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 40);
          Command cmd2 = Command.from(groupKey, key, HystrixEventType.RESPONSE_FROM_CACHE);
          Command cmd3 = Command.from(groupKey, key, HystrixEventType.RESPONSE_FROM_CACHE);
          Command cmd4 = Command.from(groupKey, key, HystrixEventType.RESPONSE_FROM_CACHE);
  
          cmd1.observe();
          Thread.sleep(5);
          cmd2.observe();
          cmd3.observe();
          cmd4.observe();
  
          assertTrue(latch.await(10000, TimeUnit.MILLISECONDS));
          System.out.println("ReqLog : " + HystrixRequestLog.getCurrentRequest().getExecutedCommandsAsString());
          assertTrue(cmd2.isResponseFromCache());
          assertTrue(cmd3.isResponseFromCache());
          assertTrue(cmd4.isResponseFromCache());
          assertEquals(1, stream.getLatestRollingMax());
      }
test_case.class_method_signature: RollingThreadPoolMaxConcurrencyStreamTest.testConcurrencyStreamProperlyFiltersOutResponseFromCache()
test_case.full_signature: @Test public void testConcurrencyStreamProperlyFiltersOutResponseFromCache()
test_case.identifier: testConcurrencyStreamProperlyFiltersOutResponseFromCache
test_case.invocations: asKey asKey asKey getInstance startCachingStreamValuesIfUnstarted subscribe take observe getSubscriber from from from from observe sleep observe observe observe assertTrue await println getExecutedCommandsAsString getCurrentRequest assertTrue isResponseFromCache assertTrue isResponseFromCache assertTrue isResponseFromCache assertEquals getLatestRollingMax
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConcurrencyStreamProperlyFiltersOutResponseFromCache()
focal_class.declarator: streams = new ConcurrentHashMap<String, RollingThreadPoolMaxConcurrencyStream>()
focal_class.modifier: private static final
focal_class.original_string: private static final ConcurrentMap<String, RollingThreadPoolMaxConcurrencyStream> streams = new ConcurrentHashMap<String, RollingThreadPoolMaxConcurrencyStream>();
focal_class.type: ConcurrentMap<String, RollingThreadPoolMaxConcurrencyStream>
focal_class.var_name: streams
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingThreadPoolMaxConcurrencyStream.java
focal_class.identifier: RollingThreadPoolMaxConcurrencyStream
focal_class.class_method_signature: RollingThreadPoolMaxConcurrencyStream.getInstance(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)
focal_class.full_signature: public static RollingThreadPoolMaxConcurrencyStream getInstance(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: (HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)
focal_class.return: RollingThreadPoolMaxConcurrencyStream
focal_class.signature: RollingThreadPoolMaxConcurrencyStream getInstance(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)
focal_class.class_method_signature: RollingThreadPoolMaxConcurrencyStream.getInstance(HystrixThreadPoolKey threadPoolKey, int numBuckets, int bucketSizeInMs)
focal_class.full_signature: public static RollingThreadPoolMaxConcurrencyStream getInstance(HystrixThreadPoolKey threadPoolKey, int numBuckets, int bucketSizeInMs)
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: (HystrixThreadPoolKey threadPoolKey, int numBuckets, int bucketSizeInMs)
focal_class.return: RollingThreadPoolMaxConcurrencyStream
focal_class.signature: RollingThreadPoolMaxConcurrencyStream getInstance(HystrixThreadPoolKey threadPoolKey, int numBuckets, int bucketSizeInMs)
focal_class.class_method_signature: RollingThreadPoolMaxConcurrencyStream.reset()
focal_class.full_signature: public static void reset()
focal_class.identifier: reset
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: RollingThreadPoolMaxConcurrencyStream.RollingThreadPoolMaxConcurrencyStream(final HystrixThreadPoolKey threadPoolKey, final int numBuckets, final int bucketSizeInMs)
focal_class.full_signature: public  RollingThreadPoolMaxConcurrencyStream(final HystrixThreadPoolKey threadPoolKey, final int numBuckets, final int bucketSizeInMs)
focal_class.identifier: RollingThreadPoolMaxConcurrencyStream
focal_class.modifiers: public
focal_class.parameters: (final HystrixThreadPoolKey threadPoolKey, final int numBuckets, final int bucketSizeInMs)
focal_class.signature:  RollingThreadPoolMaxConcurrencyStream(final HystrixThreadPoolKey threadPoolKey, final int numBuckets, final int bucketSizeInMs)
focal_class.superclass: extends RollingConcurrencyStream
focal_method.body: public static RollingThreadPoolMaxConcurrencyStream getInstance(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties) {
          final int counterMetricWindow = properties.metricsRollingStatisticalWindowInMilliseconds().get();
          final int numCounterBuckets = properties.metricsRollingStatisticalWindowBuckets().get();
          final int counterBucketSizeInMs = counterMetricWindow / numCounterBuckets;
  
          return getInstance(threadPoolKey, numCounterBuckets, counterBucketSizeInMs);
      }
focal_method.class_method_signature: RollingThreadPoolMaxConcurrencyStream.getInstance(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)
focal_method.full_signature: public static RollingThreadPoolMaxConcurrencyStream getInstance(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)
focal_method.identifier: getInstance
focal_method.invocations: get metricsRollingStatisticalWindowInMilliseconds get metricsRollingStatisticalWindowBuckets getInstance
focal_method.modifiers: public static
focal_method.parameters: (HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)
focal_method.return: RollingThreadPoolMaxConcurrencyStream
focal_method.signature: RollingThreadPoolMaxConcurrencyStream getInstance(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties properties)