void validateAllOffsetsMatch(ExperimentDef config) {
            //Validate that offsets are correct in all brokers
            for (KafkaServer broker : servers) {
                for (int partitionId = 0; partitionId < config.partitions; partitionId++) {
                    long offset = broker.getLogManager().getLog(new TopicPartition(TOPIC_NAME, partitionId), false).map(UnifiedLog::logEndOffset).getOrElse(() -> -1L);
                    if (offset >= 0 && offset != config.msgsPerPartition) {
                        throw new RuntimeException(
                            "Run failed as offsets did not match for partition " + partitionId + " on broker " + broker.config().brokerId() + ". " +
                            "Expected " + config.msgsPerPartition + " but was " + offset + "."
                        );
                    }
                }
            }
        }
Test rig for measuring throttling performance. Configure the parameters for a set of experiments, then execute them
and view the html output file, with charts, that are produced. You can also render the charts to the screen if
you wish.

Currently you'll need about 40GB of disk space to run these experiments (largest data written x2). Tune the msgSize
& #partitions and throttle to adjust this.
tools/src/test/java/org/apache/kafka/tools/other/ReplicationQuotasTestRig.java