enhancing the performance test

This commit is contained in:
Stefan Bratanov 2022-11-25 14:51:12 +00:00
parent 73bba9ef91
commit b77bd70817
2 changed files with 11 additions and 5 deletions

View File

@ -7,7 +7,12 @@ repositories {
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
def junitVersion = "5.9.1"
testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}")
}
test {

View File

@ -11,6 +11,8 @@ import java.util.Random;
import java.util.stream.IntStream;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
public class CKZg4844JNITest {
@ -65,13 +67,12 @@ public class CKZg4844JNITest {
}
@Disabled("Use for manually testing performance.")
@Test
public void testPerformance() {
@ParameterizedTest
@ValueSource(ints = {1, 10, 100, 1000})
public void testPerformance(final int count) {
loadTrustedSetup();
final int count = 100;
final byte[] blobs = createRandomBlobs(count);
final byte[] commitments = getCommitmentsForBlobs(blobs, count);