public static @Nullable StatData getStatData(boolean measureStartupLoad, boolean isSvg) {
    List<Integer> stats = getStats(isSvg);
    if (stats.isEmpty()) {
      return null;
    }

    //noinspection SynchronizationOnLocalVariableOrMethodParameter
    synchronized (stats) {
      int size = stats.size();
      int sum = stats.stream().mapToInt(Integer::intValue).sum();
      int average = sum / size;
      int median = (size % 2 == 0) ? stats.get(size / 2 - 1) + stats.get(size / 2) : stats.get(size / 2);
      return new StatData(isSvg, measureStartupLoad, sum, average, median, size);
    }
  }
public static @Nullable StatData getStatData(boolean measureStartupLoad, boolean isSvg)