private static int getTotalWaitingCommands() {
    int totalWaitingCommands = 0;
    final String hystrixPoolName = EXAMPLE_GROUP;

    HystrixThreadPoolKey key = HystrixThreadPoolKey.Factory.asKey(hystrixPoolName);

    HystrixThreadPoolMetrics metrics = HystrixThreadPoolMetrics.getInstance(key);

    if (metrics != null) {
      Number active = metrics.getCurrentActiveCount();
      Number queueSize = metrics.getCurrentQueueSize();
      totalWaitingCommands = active.intValue() + queueSize.intValue();
      LOG.debug("{} has {} commands waiting", hystrixPoolName, totalWaitingCommands);
    }

    return totalWaitingCommands;
  }