private @NotNull List<Pair<String, Long>> takeSnapshot() {
        List<Pair<String, Long>> times = new ArrayList<>();
        for (Object2LongMap.Entry<String> entry : subsystemToSamples.object2LongEntrySet()) {
          times.add(new Pair<>(entry.getKey(), TimeUnit.NANOSECONDS.toMillis(entry.getLongValue())));
        }
        subsystemToSamples.clear();

        long gcTime = totalGcTime();
        if (gcTime != lastGcTime) {
          times.add(Pair.create("<Garbage collection>", gcTime - lastGcTime));
          lastGcTime = gcTime;
        }

        long jitTime = jitBean.getTotalCompilationTime();
        if (jitTime != lastJitTime) {
          times.add(Pair.create("<JIT compiler>", jitTime - lastJitTime));
          lastJitTime = jitTime;
        }

        long processTime = totalProcessTime();
        if (processTime != lastProcessTime) {
          times.add(Pair.create("<Process total CPU usage>", TimeUnit.NANOSECONDS.toMillis(processTime - lastProcessTime)));
          lastProcessTime = processTime;
        }

        return times;
      }
private @NotNull List<Pair<String, Long>> takeSnapshot()