test_class.declarator: stream
test_class.original_string: RollingCommandMaxConcurrencyStream stream;
test_class.type: RollingCommandMaxConcurrencyStream
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.declarator: groupKey = HystrixCommandGroupKey.Factory.asKey("Command-Concurrency")
test_class.modifier: static
test_class.original_string: static HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.asKey("Command-Concurrency");
test_class.type: HystrixCommandGroupKey
test_class.var_name: groupKey
test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/metric/consumer/RollingCommandMaxConcurrencyStreamTest.java
test_class.identifier: RollingCommandMaxConcurrencyStreamTest
test_class.superclass: extends CommandStreamTest
test_case.body: @Test
      public void testEmptyStreamProducesZeros() {
          HystrixCommandKey key = HystrixCommandKey.Factory.asKey("CMD-Concurrency-A");
          stream = RollingCommandMaxConcurrencyStream.getInstance(key, 10, 500);
          stream.startCachingStreamValuesIfUnstarted();
  
          final CountDownLatch latch = new CountDownLatch(1);
          stream.observe().take(5).subscribe(getSubscriber(latch));
  
          //no writes
  
          try {
              assertTrue(latch.await(10000, TimeUnit.MILLISECONDS));
          } catch (InterruptedException ex) {
              fail("Interrupted ex");
          }
          assertEquals(0, stream.getLatestRollingMax());
      }
test_case.class_method_signature: RollingCommandMaxConcurrencyStreamTest.testEmptyStreamProducesZeros()
test_case.full_signature: @Test public void testEmptyStreamProducesZeros()
test_case.identifier: testEmptyStreamProducesZeros
test_case.invocations: asKey getInstance startCachingStreamValuesIfUnstarted subscribe take observe getSubscriber assertTrue await fail assertEquals getLatestRollingMax
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmptyStreamProducesZeros()
focal_class.declarator: streams = new ConcurrentHashMap<String, RollingCommandMaxConcurrencyStream>()
focal_class.modifier: private static final
focal_class.original_string: private static final ConcurrentMap<String, RollingCommandMaxConcurrencyStream> streams = new ConcurrentHashMap<String, RollingCommandMaxConcurrencyStream>();
focal_class.type: ConcurrentMap<String, RollingCommandMaxConcurrencyStream>
focal_class.var_name: streams
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/metric/consumer/RollingCommandMaxConcurrencyStream.java
focal_class.identifier: RollingCommandMaxConcurrencyStream
focal_class.class_method_signature: RollingCommandMaxConcurrencyStream.getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties)
focal_class.full_signature: public static RollingCommandMaxConcurrencyStream getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties)
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: (HystrixCommandKey commandKey, HystrixCommandProperties properties)
focal_class.return: RollingCommandMaxConcurrencyStream
focal_class.signature: RollingCommandMaxConcurrencyStream getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties)
focal_class.class_method_signature: RollingCommandMaxConcurrencyStream.getInstance(HystrixCommandKey commandKey, int numBuckets, int bucketSizeInMs)
focal_class.full_signature: public static RollingCommandMaxConcurrencyStream getInstance(HystrixCommandKey commandKey, int numBuckets, int bucketSizeInMs)
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: (HystrixCommandKey commandKey, int numBuckets, int bucketSizeInMs)
focal_class.return: RollingCommandMaxConcurrencyStream
focal_class.signature: RollingCommandMaxConcurrencyStream getInstance(HystrixCommandKey commandKey, int numBuckets, int bucketSizeInMs)
focal_class.class_method_signature: RollingCommandMaxConcurrencyStream.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: RollingCommandMaxConcurrencyStream.RollingCommandMaxConcurrencyStream(final HystrixCommandKey commandKey, final int numBuckets, final int bucketSizeInMs)
focal_class.full_signature: private  RollingCommandMaxConcurrencyStream(final HystrixCommandKey commandKey, final int numBuckets, final int bucketSizeInMs)
focal_class.identifier: RollingCommandMaxConcurrencyStream
focal_class.modifiers: private
focal_class.parameters: (final HystrixCommandKey commandKey, final int numBuckets, final int bucketSizeInMs)
focal_class.signature:  RollingCommandMaxConcurrencyStream(final HystrixCommandKey commandKey, final int numBuckets, final int bucketSizeInMs)
focal_class.superclass: extends RollingConcurrencyStream
focal_method.body: public static RollingCommandMaxConcurrencyStream getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties) {
          final int counterMetricWindow = properties.metricsRollingStatisticalWindowInMilliseconds().get();
          final int numCounterBuckets = properties.metricsRollingStatisticalWindowBuckets().get();
          final int counterBucketSizeInMs = counterMetricWindow / numCounterBuckets;
  
          return getInstance(commandKey, numCounterBuckets, counterBucketSizeInMs);
      }
focal_method.class_method_signature: RollingCommandMaxConcurrencyStream.getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties)
focal_method.full_signature: public static RollingCommandMaxConcurrencyStream getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties)
focal_method.identifier: getInstance
focal_method.invocations: get metricsRollingStatisticalWindowInMilliseconds get metricsRollingStatisticalWindowBuckets getInstance
focal_method.modifiers: public static
focal_method.parameters: (HystrixCommandKey commandKey, HystrixCommandProperties properties)
focal_method.return: RollingCommandMaxConcurrencyStream
focal_method.signature: RollingCommandMaxConcurrencyStream getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties)