Skip to content

Commit 0d053a0

Browse files
authored
Merge pull request #89 from stleary/update-timeNumberParsing-iterations
reduce number of iterations to shorten test time
2 parents 4c64ad3 + e4186e0 commit 0d053a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/java/org/json/junit/JSONObjectTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@ public void timeNumberParsing() {
122122
+ "0a"
123123
};
124124
final int testDataLength = testData.length;
125-
final int iterations = 1000000;
125+
/**
126+
* Changed to 1000 for faster test runs
127+
*/
128+
// final int iterations = 1000000;
129+
final int iterations = 1000;
126130

127-
// 10 million iterations 1,000,000 * 10
131+
// 10 million iterations 1,000,000 * 10 (currently 100,000)
128132
long startTime = System.nanoTime();
129133
for(int i = 0; i < iterations; i++) {
130134
for(int j = 0; j < testDataLength; j++) {

0 commit comments

Comments
 (0)