private static long jvmInternalsMemory(@NotNull List<MemoryPoolMXBean> memoryPools) {
    return memoryPools.stream()
      .filter(pool -> pool.getType() == MemoryType.NON_HEAP)
      .mapToLong(pool -> pool.getUsage().getUsed())
      .sum();
  }
private static long jvmInternalsMemory(@NotNull List<MemoryPoolMXBean> memoryPools)