private static void doWrites(int writeWorkers, long items, ExternalMergeSort sorter) {
    var counters = Counter.newMultiThreadCounter();
    var writer = new Worker("write", Stats.inMemory(), writeWorkers, () -> {
      try (var writerForThread = sorter.writerForThread()) {
        var counter = counters.counterForThread();
        var random = ThreadLocalRandom.current();
        long toWrite = items / writeWorkers;
        for (long i = 0; i < toWrite; i++) {
          writerForThread.accept(new SortableFeature(random.nextLong(), TEST_DATA));
          counter.inc();
        }
      }
    });
    ProgressLoggers loggers = ProgressLoggers.create()
      .addRatePercentCounter("items", items, counters, false)
      .addFileSize(sorter)
      .newLine()
      .addProcessStats()
      .newLine()
      .addThreadPoolStats("writer", writer);
    writer.awaitAndLog(loggers, Duration.ofSeconds(1));
  }
Performance tests for {@link ExternalMergeSort}. Times how long it takes to write temp features, sort, then read them
back with different parameters.
<p>
Usage: {@code BenchmarkExternalMergeSort &lt;number of GB of features to write&gt;}
planetiler-benchmarks/src/main/java/com/onthegomap/planetiler/collection/BenchmarkExternalMergeSort.java