/**
  * Complete execution time of {@link HystrixCommand#execute()} or {@link HystrixCommand#queue()}
  * (queue is considered complete once the work is finished and {@link Future#get} is capable of
  * retrieving the value.
  *
  * <p>This differs from {@link #addCommandExecutionTime} in that this covers all of the threading
  * and scheduling overhead, not just the execution of the {@link HystrixCommand#run()} method.
  */
 /* package */ void addUserThreadExecutionTime(long duration) {
   percentileTotal.addValue((int) duration);
 }
 /** Execution time of {@link HystrixCommand#run()}. */
 /* package */ void addCommandExecutionTime(long duration) {
   percentileExecution.addValue((int) duration);
 }
 /**
  * The mean (average) execution time (in milliseconds) for {@link HystrixCommand#execute()} or
  * {@link HystrixCommand#queue()}.
  *
  * <p>This uses the same backing data as {@link #getTotalTimePercentile};
  *
  * @return int time in milliseconds
  */
 public int getTotalTimeMean() {
   return percentileTotal.getMean();
 }
 /**
  * Retrieve the total end-to-end execution time (in milliseconds) for {@link
  * HystrixCommand#execute()} or {@link HystrixCommand#queue()} at a given percentile.
  *
  * <p>When execution is successful this would include time from {@link
  * #getExecutionTimePercentile} but when execution is being rejected, short-circuited, or
  * timed-out then the time will differ.
  *
  * <p>This time can be lower than {@link #getExecutionTimePercentile} when a timeout occurs and
  * the backing thread that calls {@link HystrixCommand#run()} is still running.
  *
  * <p>When rejections or short-circuits occur then {@link HystrixCommand#run()} will not be
  * executed and thus not contribute time to {@link #getExecutionTimePercentile} but time will
  * still show up in this metric for the end-to-end time.
  *
  * <p>This metric gives visibility into the total cost of {@link HystrixCommand} execution
  * including the overhead of queuing, executing and waiting for a thread to invoke {@link
  * HystrixCommand#run()} .
  *
  * <p>Percentile capture and calculation is configured via {@link
  * HystrixCommandProperties#metricsRollingStatisticalWindowInMilliseconds()} and other related
  * properties.
  *
  * @param percentile Percentile such as 50, 99, or 99.5.
  * @return int time in milliseconds
  */
 public int getTotalTimePercentile(double percentile) {
   return percentileTotal.getPercentile(percentile);
 }
 /**
  * The mean (average) execution time (in milliseconds) for the {@link HystrixCommand#run()}.
  *
  * <p>This uses the same backing data as {@link #getExecutionTimePercentile};
  *
  * @return int time in milliseconds
  */
 public int getExecutionTimeMean() {
   return percentileExecution.getMean();
 }
 /**
  * Retrieve the execution time (in milliseconds) for the {@link HystrixCommand#run()} method being
  * invoked at a given percentile.
  *
  * <p>Percentile capture and calculation is configured via {@link
  * HystrixCommandProperties#metricsRollingStatisticalWindowInMilliseconds()} and other related
  * properties.
  *
  * @param percentile Percentile such as 50, 99, or 99.5.
  * @return int time in milliseconds
  */
 public int getExecutionTimePercentile(double percentile) {
   return percentileExecution.getPercentile(percentile);
 }