private static Duration testPriorityQueue(int size) {
    long[][] vals = getVals(size);
    int[] indexes = new int[size];
    PriorityQueue<Item> heap = new PriorityQueue<>();
    for (int i = 0; i < size; i++) {
      Item item = new Item();
      item.id = i;
      item.value = vals[i][indexes[i]++];
      heap.offer(item);
    }
    var start = System.nanoTime();
    while (!heap.isEmpty()) {
      var item = heap.poll();
      int index = indexes[item.id]++;
      long[] valList = vals[item.id];
      if (index < valList.length) {
        item.value = valList[index];
        heap.offer(item);
      }
    }
    return Duration.ofNanos(System.nanoTime() - start);
  }
Performance tests for {@link LongMinHeap} implementations.

Times how long it takes to merge N sorted lists of random elements.
planetiler-benchmarks/src/main/java/com/onthegomap/planetiler/collection/BenchmarkKWayMerge.java