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_Extremes() {
          PercentileSnapshot p = new PercentileSnapshot(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 800, 768, 657, 700, 867);
  
          System.out.println("0.01: " + p.getPercentile(0.01));
          System.out.println("10th: " + p.getPercentile(10));
          System.out.println("Median: " + p.getPercentile(50));
          System.out.println("75th: " + p.getPercentile(75));
          System.out.println("90th: " + p.getPercentile(90));
          System.out.println("99th: " + p.getPercentile(99));
          System.out.println("99.5th: " + p.getPercentile(99.5));
          System.out.println("99.99: " + p.getPercentile(99.99));
          Assert.assertEquals(2, p.getPercentile(50));
          Assert.assertEquals(2, p.getPercentile(10));
          Assert.assertEquals(2, p.getPercentile(75));
          if (p.getPercentile(95) < 600) {
              fail("We expect the 90th to be over 600 to show the extremes but got: " + p.getPercentile(90));
          }
          if (p.getPercentile(99) < 600) {
              fail("We expect the 99th to be over 600 to show the extremes but got: " + p.getPercentile(99));
          }
      }
test_case.class_method_signature: HystrixRollingPercentileTest.testPercentileAlgorithm_Extremes()
test_case.full_signature: @Test public void testPercentileAlgorithm_Extremes()
test_case.identifier: testPercentileAlgorithm_Extremes
test_case.invocations: println getPercentile println getPercentile println getPercentile println getPercentile println getPercentile println getPercentile println getPercentile println getPercentile assertEquals getPercentile assertEquals getPercentile assertEquals getPercentile getPercentile fail getPercentile getPercentile fail getPercentile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPercentileAlgorithm_Extremes()
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)