code: public static Snapshot getSnapshot(ExecutorService service) {
          Preconditions.checkNotNull(service, "service");
          if (service instanceof ThreadPoolExecutor) {
              val tpe = (ThreadPoolExecutor) service;
              return new Snapshot(tpe.getQueue().size(), tpe.getActiveCount(), tpe.getPoolSize());
          } else if (service instanceof ForkJoinPool) {
              val fjp = (ForkJoinPool) service;
              return new Snapshot(fjp.getQueuedSubmissionCount(), fjp.getActiveThreadCount(), fjp.getPoolSize());
          } else {
              return null;
          }
      }
docs: Gets a snapshot of the given ExecutorService.
  
  @param service The ExecutorService to request a snapshot on.
  @return A Snapshot of the given ExecutorService, or null if not supported.