test_class.declarator: timeInMilliseconds = 60000
test_class.modifier: private static final
test_class.original_string: private static final int timeInMilliseconds = 60000;
test_class.type: int
test_class.var_name: timeInMilliseconds
test_class.declarator: numberOfBuckets = 12
test_class.modifier: private static final
test_class.original_string: private static final int numberOfBuckets = 12;
test_class.type: int
test_class.var_name: numberOfBuckets
test_class.declarator: bucketDataLength = 1000
test_class.modifier: private static final
test_class.original_string: private static final int bucketDataLength = 1000;
test_class.type: int
test_class.var_name: bucketDataLength
test_class.declarator: enabled = HystrixProperty.Factory.asProperty(true)
test_class.modifier: private static final
test_class.original_string: private static final HystrixProperty<Boolean> enabled = HystrixProperty.Factory.asProperty(true);
test_class.type: HystrixProperty<Boolean>
test_class.var_name: enabled
test_class.declarator: threadPool
test_class.modifier: private static
test_class.original_string: private static ExecutorService threadPool;
test_class.type: ExecutorService
test_class.var_name: threadPool
test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/util/HystrixRollingPercentileTest.java
test_class.identifier: HystrixRollingPercentileTest
test_case.body: @Test
      public void testPercentileAlgorithm_Percentiles() {
          PercentileSnapshot p = getPercentileForValues(10, 30, 20, 40);
          Assert.assertEquals(22, p.getPercentile(30), 1.0e-5);
          Assert.assertEquals(20, p.getPercentile(25), 1.0e-5);
          Assert.assertEquals(40, p.getPercentile(75), 1.0e-5);
          Assert.assertEquals(30, p.getPercentile(50), 1.0e-5);
  
          // invalid percentiles
          Assert.assertEquals(10, p.getPercentile(-1));
          Assert.assertEquals(40, p.getPercentile(101));
      }
test_case.class_method_signature: HystrixRollingPercentileTest.testPercentileAlgorithm_Percentiles()
test_case.full_signature: @Test public void testPercentileAlgorithm_Percentiles()
test_case.identifier: testPercentileAlgorithm_Percentiles
test_case.invocations: getPercentileForValues assertEquals getPercentile assertEquals getPercentile assertEquals getPercentile assertEquals getPercentile assertEquals getPercentile assertEquals getPercentile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPercentileAlgorithm_Percentiles()
focal_class.declarator: logger = LoggerFactory.getLogger(HystrixRollingPercentile.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(HystrixRollingPercentile.class);
focal_class.type: Logger
focal_class.var_name: logger
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: buckets
focal_class.modifier: final
focal_class.original_string: final BucketCircularArray buckets;
focal_class.type: BucketCircularArray
focal_class.var_name: buckets
focal_class.declarator: timeInMilliseconds
focal_class.modifier: private final
focal_class.original_string: private final int timeInMilliseconds;
focal_class.type: int
focal_class.var_name: timeInMilliseconds
focal_class.declarator: numberOfBuckets
focal_class.modifier: private final
focal_class.original_string: private final int numberOfBuckets;
focal_class.type: int
focal_class.var_name: numberOfBuckets
focal_class.declarator: bucketDataLength
focal_class.modifier: private final
focal_class.original_string: private final int bucketDataLength;
focal_class.type: int
focal_class.var_name: bucketDataLength
focal_class.declarator: bucketSizeInMilliseconds
focal_class.modifier: private final
focal_class.original_string: private final int bucketSizeInMilliseconds;
focal_class.type: int
focal_class.var_name: bucketSizeInMilliseconds
focal_class.declarator: enabled
focal_class.modifier: private final
focal_class.original_string: private final HystrixProperty<Boolean> enabled;
focal_class.type: HystrixProperty<Boolean>
focal_class.var_name: enabled
focal_class.declarator: currentPercentileSnapshot = new PercentileSnapshot(0)
focal_class.modifier: volatile
focal_class.original_string: volatile PercentileSnapshot currentPercentileSnapshot = new PercentileSnapshot(0);
focal_class.type: PercentileSnapshot
focal_class.var_name: currentPercentileSnapshot
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/HystrixRollingPercentile.java
focal_class.identifier: HystrixRollingPercentile
focal_class.class_method_signature: HystrixRollingPercentile.HystrixRollingPercentile(HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets, HystrixProperty<Integer> bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.full_signature: @Deprecated public  HystrixRollingPercentile(HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets, HystrixProperty<Integer> bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.identifier: HystrixRollingPercentile
focal_class.modifiers: @Deprecated public
focal_class.parameters: (HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets, HystrixProperty<Integer> bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.signature:  HystrixRollingPercentile(HystrixProperty<Integer> timeInMilliseconds, HystrixProperty<Integer> numberOfBuckets, HystrixProperty<Integer> bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.class_method_signature: HystrixRollingPercentile.HystrixRollingPercentile(int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.full_signature: public  HystrixRollingPercentile(int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.identifier: HystrixRollingPercentile
focal_class.modifiers: public
focal_class.parameters: (int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.signature:  HystrixRollingPercentile(int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.class_method_signature: HystrixRollingPercentile.HystrixRollingPercentile(Time time, int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.full_signature:   HystrixRollingPercentile(Time time, int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.identifier: HystrixRollingPercentile
focal_class.parameters: (Time time, int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.signature:  HystrixRollingPercentile(Time time, int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, HystrixProperty<Boolean> enabled)
focal_class.class_method_signature: HystrixRollingPercentile.addValue(int... value)
focal_class.full_signature: public void addValue(int... value)
focal_class.identifier: addValue
focal_class.modifiers: public
focal_class.parameters: (int... value)
focal_class.return: void
focal_class.signature: void addValue(int... value)
focal_class.class_method_signature: HystrixRollingPercentile.getPercentile(double percentile)
focal_class.full_signature: public int getPercentile(double percentile)
focal_class.identifier: getPercentile
focal_class.modifiers: public
focal_class.parameters: (double percentile)
focal_class.return: int
focal_class.signature: int getPercentile(double percentile)
focal_class.class_method_signature: HystrixRollingPercentile.getMean()
focal_class.full_signature: public int getMean()
focal_class.identifier: getMean
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMean()
focal_class.class_method_signature: HystrixRollingPercentile.getCurrentPercentileSnapshot()
focal_class.full_signature: private PercentileSnapshot getCurrentPercentileSnapshot()
focal_class.identifier: getCurrentPercentileSnapshot
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: PercentileSnapshot
focal_class.signature: PercentileSnapshot getCurrentPercentileSnapshot()
focal_class.class_method_signature: HystrixRollingPercentile.getCurrentBucket()
focal_class.full_signature: private Bucket getCurrentBucket()
focal_class.identifier: getCurrentBucket
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Bucket
focal_class.signature: Bucket getCurrentBucket()
focal_class.class_method_signature: HystrixRollingPercentile.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_method.body: public int getPercentile(double percentile) {
          /* no-op if disabled */
          if (!enabled.get())
              return -1;
  
          // force logic to move buckets forward in case other requests aren't making it happen
          getCurrentBucket();
          // fetch the current snapshot
          return getCurrentPercentileSnapshot().getPercentile(percentile);
      }
focal_method.class_method_signature: HystrixRollingPercentile.getPercentile(double percentile)
focal_method.full_signature: public int getPercentile(double percentile)
focal_method.identifier: getPercentile
focal_method.invocations: get getCurrentBucket getPercentile getCurrentPercentileSnapshot
focal_method.modifiers: public
focal_method.parameters: (double percentile)
focal_method.return: int
focal_method.signature: int getPercentile(double percentile)