test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/util/HystrixRollingNumberTest.java
test_class.identifier: HystrixRollingNumberTest
test_case.body: @Test
      public void testIncrementInSingleBucket() {
          MockedTime time = new MockedTime();
          try {
              HystrixRollingNumber counter = new HystrixRollingNumber(time, 200, 10);
  
              // increment
              counter.increment(HystrixRollingNumberEvent.SUCCESS);
              counter.increment(HystrixRollingNumberEvent.SUCCESS);
              counter.increment(HystrixRollingNumberEvent.SUCCESS);
              counter.increment(HystrixRollingNumberEvent.SUCCESS);
              counter.increment(HystrixRollingNumberEvent.FAILURE);
              counter.increment(HystrixRollingNumberEvent.FAILURE);
              counter.increment(HystrixRollingNumberEvent.TIMEOUT);
  
              // we should have 1 bucket
              assertEquals(1, counter.buckets.size());
  
              // the count should be 4
              assertEquals(4, counter.buckets.getLast().getAdder(HystrixRollingNumberEvent.SUCCESS).sum());
              assertEquals(2, counter.buckets.getLast().getAdder(HystrixRollingNumberEvent.FAILURE).sum());
              assertEquals(1, counter.buckets.getLast().getAdder(HystrixRollingNumberEvent.TIMEOUT).sum());
  
          } catch (Exception e) {
              e.printStackTrace();
              fail("Exception: " + e.getMessage());
          }
      }
test_case.class_method_signature: HystrixRollingNumberTest.testIncrementInSingleBucket()
test_case.full_signature: @Test public void testIncrementInSingleBucket()
test_case.identifier: testIncrementInSingleBucket
test_case.invocations: increment increment increment increment increment increment increment assertEquals size assertEquals sum getAdder getLast assertEquals sum getAdder getLast assertEquals sum getAdder getLast printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIncrementInSingleBucket()
focal_class.declarator: ACTUAL_TIME = new ActualTime()
focal_class.modifier: private static final
focal_class.original_string: private static final Time ACTUAL_TIME = new ActualTime();
focal_class.type: Time
focal_class.var_name: ACTUAL_TIME
focal_class.declarator: time
focal_class.modifier: private final
focal_class.original_string: private final Time time;
focal_class.type: Time
focal_class.var_name: time
focal_class.declarator: timeInMilliseconds
focal_class.modifier: final
focal_class.original_string: final int timeInMilliseconds;
focal_class.type: int
focal_class.var_name: timeInMilliseconds
focal_class.declarator: numberOfBuckets
focal_class.modifier: final
focal_class.original_string: final int numberOfBuckets;
focal_class.type: int
focal_class.var_name: numberOfBuckets
focal_class.declarator: bucketSizeInMillseconds
focal_class.modifier: final
focal_class.original_string: final int bucketSizeInMillseconds;
focal_class.type: int
focal_class.var_name: bucketSizeInMillseconds
focal_class.declarator: buckets
focal_class.modifier: final
focal_class.original_string: final BucketCircularArray buckets;
focal_class.type: BucketCircularArray
focal_class.var_name: buckets
focal_class.declarator: cumulativeSum = new CumulativeSum()
focal_class.modifier: private final
focal_class.original_string: private final CumulativeSum cumulativeSum = new CumulativeSum();
focal_class.type: CumulativeSum
focal_class.var_name: cumulativeSum
focal_class.declarator: newBucketLock = new ReentrantLock()
focal_class.modifier: private
focal_class.original_string: private ReentrantLock newBucketLock = new ReentrantLock();
focal_class.type: ReentrantLock
focal_class.var_name: newBucketLock
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixRollingNumber.java
focal_class.identifier: HystrixRollingNumber
focal_class.class_method_signature: HystrixRollingNumber.HystrixRollingNumber(HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets)
focal_class.full_signature: @Deprecated public  HystrixRollingNumber(HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets)
focal_class.identifier: HystrixRollingNumber
focal_class.modifiers: @Deprecated public
focal_class.parameters: (HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets)
focal_class.signature:  HystrixRollingNumber(HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets)
focal_class.class_method_signature: HystrixRollingNumber.HystrixRollingNumber(int timeInMilliseconds, int numberOfBuckets)
focal_class.full_signature: public  HystrixRollingNumber(int timeInMilliseconds, int numberOfBuckets)
focal_class.identifier: HystrixRollingNumber
focal_class.modifiers: public
focal_class.parameters: (int timeInMilliseconds, int numberOfBuckets)
focal_class.signature:  HystrixRollingNumber(int timeInMilliseconds, int numberOfBuckets)
focal_class.class_method_signature: HystrixRollingNumber.HystrixRollingNumber(Time time, int timeInMilliseconds, int numberOfBuckets)
focal_class.full_signature:   HystrixRollingNumber(Time time, int timeInMilliseconds, int numberOfBuckets)
focal_class.identifier: HystrixRollingNumber
focal_class.parameters: (Time time, int timeInMilliseconds, int numberOfBuckets)
focal_class.signature:  HystrixRollingNumber(Time time, int timeInMilliseconds, int numberOfBuckets)
focal_class.class_method_signature: HystrixRollingNumber.increment(HystrixRollingNumberEvent type)
focal_class.full_signature: public void increment(HystrixRollingNumberEvent type)
focal_class.identifier: increment
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type)
focal_class.return: void
focal_class.signature: void increment(HystrixRollingNumberEvent type)
focal_class.class_method_signature: HystrixRollingNumber.add(HystrixRollingNumberEvent type, long value)
focal_class.full_signature: public void add(HystrixRollingNumberEvent type, long value)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type, long value)
focal_class.return: void
focal_class.signature: void add(HystrixRollingNumberEvent type, long value)
focal_class.class_method_signature: HystrixRollingNumber.updateRollingMax(HystrixRollingNumberEvent type, long value)
focal_class.full_signature: public void updateRollingMax(HystrixRollingNumberEvent type, long value)
focal_class.identifier: updateRollingMax
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type, long value)
focal_class.return: void
focal_class.signature: void updateRollingMax(HystrixRollingNumberEvent type, long value)
focal_class.class_method_signature: HystrixRollingNumber.reset()
focal_class.full_signature: public void reset()
focal_class.identifier: reset
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: HystrixRollingNumber.getCumulativeSum(HystrixRollingNumberEvent type)
focal_class.full_signature: public long getCumulativeSum(HystrixRollingNumberEvent type)
focal_class.identifier: getCumulativeSum
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type)
focal_class.return: long
focal_class.signature: long getCumulativeSum(HystrixRollingNumberEvent type)
focal_class.class_method_signature: HystrixRollingNumber.getRollingSum(HystrixRollingNumberEvent type)
focal_class.full_signature: public long getRollingSum(HystrixRollingNumberEvent type)
focal_class.identifier: getRollingSum
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type)
focal_class.return: long
focal_class.signature: long getRollingSum(HystrixRollingNumberEvent type)
focal_class.class_method_signature: HystrixRollingNumber.getValueOfLatestBucket(HystrixRollingNumberEvent type)
focal_class.full_signature: public long getValueOfLatestBucket(HystrixRollingNumberEvent type)
focal_class.identifier: getValueOfLatestBucket
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type)
focal_class.return: long
focal_class.signature: long getValueOfLatestBucket(HystrixRollingNumberEvent type)
focal_class.class_method_signature: HystrixRollingNumber.getValues(HystrixRollingNumberEvent type)
focal_class.full_signature: public long[] getValues(HystrixRollingNumberEvent type)
focal_class.identifier: getValues
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type)
focal_class.return: long[]
focal_class.signature: long[] getValues(HystrixRollingNumberEvent type)
focal_class.class_method_signature: HystrixRollingNumber.getRollingMaxValue(HystrixRollingNumberEvent type)
focal_class.full_signature: public long getRollingMaxValue(HystrixRollingNumberEvent type)
focal_class.identifier: getRollingMaxValue
focal_class.modifiers: public
focal_class.parameters: (HystrixRollingNumberEvent type)
focal_class.return: long
focal_class.signature: long getRollingMaxValue(HystrixRollingNumberEvent type)
focal_class.class_method_signature: HystrixRollingNumber.getCurrentBucket()
focal_class.full_signature:  Bucket getCurrentBucket()
focal_class.identifier: getCurrentBucket
focal_class.parameters: ()
focal_class.return: Bucket
focal_class.signature: Bucket getCurrentBucket()
focal_method.body: public void increment(HystrixRollingNumberEvent type) {
          getCurrentBucket().getAdder(type).increment();
      }
focal_method.class_method_signature: HystrixRollingNumber.increment(HystrixRollingNumberEvent type)
focal_method.full_signature: public void increment(HystrixRollingNumberEvent type)
focal_method.identifier: increment
focal_method.invocations: increment getAdder getCurrentBucket
focal_method.modifiers: public
focal_method.parameters: (HystrixRollingNumberEvent type)
focal_method.return: void
focal_method.signature: void increment(HystrixRollingNumberEvent type)