From ce5a9a02b434d7ecb55567acda87b9e906664163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Thu, 7 Aug 2025 17:22:09 +0200 Subject: [PATCH] ReedSolomonBenchmark: Fix warmup for isParityCorrect Before conducting the actual performance test, the method under test is called twice for warmup purposes. When testing "isParityCorrect", the wrong method was called (the same as for encodeParity). Replace calls to doOneEncodeMeasurement with doOneCheckMeasurement when testing "isParityCorrect" --- src/main/java/com/backblaze/erasure/ReedSolomonBenchmark.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/backblaze/erasure/ReedSolomonBenchmark.java b/src/main/java/com/backblaze/erasure/ReedSolomonBenchmark.java index ffadeb4..9fe7763 100644 --- a/src/main/java/com/backblaze/erasure/ReedSolomonBenchmark.java +++ b/src/main/java/com/backblaze/erasure/ReedSolomonBenchmark.java @@ -76,8 +76,8 @@ public void run() { System.out.println("\nTEST: " + testName); ReedSolomon codec = new ReedSolomon(DATA_COUNT, PARITY_COUNT, codingLoop); System.out.println(" warm up..."); - doOneEncodeMeasurement(codec, bufferSets); - doOneEncodeMeasurement(codec, bufferSets); + doOneCheckMeasurement(codec, bufferSets, tempBuffer); + doOneCheckMeasurement(codec, bufferSets, tempBuffer); System.out.println(" testing..."); for (int iMeasurement = 0; iMeasurement < 10; iMeasurement++) { checkAverage.add(doOneCheckMeasurement(codec, bufferSets, tempBuffer));