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 testMultipleCommandsCarryOverMultipleBuckets() throws InterruptedException {
          HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.asKey("ThreadPool-Concurrency-E");
          HystrixThreadPoolKey threadPoolKey = HystrixThreadPoolKey.Factory.asKey("ThreadPool-Concurrency-E");
          HystrixCommandKey key = HystrixCommandKey.Factory.asKey("RollingConcurrency-E");
          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, 300);
          Command cmd2 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 300);
          Command cmd3 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 10);
          Command cmd4 = Command.from(groupKey, key, HystrixEventType.SUCCESS, 10);
  
          cmd1.observe();
          Thread.sleep(100); //bucket roll
          cmd2.observe();
          Thread.sleep(100);
          cmd3.observe();
          Thread.sleep(100);
          cmd4.observe();
  
          assertTrue(latch.await(10000, TimeUnit.MILLISECONDS));
          assertEquals(3, stream.getLatestRollingMax());
      }
test_case.class_method_signature: RollingThreadPoolMaxConcurrencyStreamTest.testMultipleCommandsCarryOverMultipleBuckets()
test_case.full_signature: @Test public void testMultipleCommandsCarryOverMultipleBuckets()
test_case.identifier: testMultipleCommandsCarryOverMultipleBuckets
test_case.invocations: asKey asKey asKey getInstance startCachingStreamValuesIfUnstarted subscribe take observe getSubscriber from from from from observe sleep observe sleep observe sleep observe assertTrue await assertEquals getLatestRollingMax
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultipleCommandsCarryOverMultipleBuckets()
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)