aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-server-benchmarks')
-rw-r--r--server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java9
-rw-r--r--server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java6
2 files changed, 8 insertions, 7 deletions
diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java
index 85726d70af8..953f036f12e 100644
--- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java
+++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java
@@ -31,7 +31,8 @@ import org.sonar.core.source.db.FileSourceDto;
import org.sonar.server.db.DbClient;
import org.sonar.server.source.db.FileSourceDao;
import org.sonar.server.source.db.FileSourceDb;
-import org.sonar.server.source.index.SourceFileResultSetIterator;
+import org.sonar.server.source.index.FileSourcesUpdaterUtil;
+import org.sonar.server.source.index.SourceLineResultSetIterator;
import java.io.IOException;
import java.sql.Connection;
@@ -73,10 +74,10 @@ public class SourceDbBenchmarkTest {
try {
long start = System.currentTimeMillis();
- SourceFileResultSetIterator it = SourceFileResultSetIterator.create(dbClient, connection, 0L, null);
+ SourceLineResultSetIterator it = SourceLineResultSetIterator.create(dbClient, connection, 0L, null);
while (it.hasNext()) {
- SourceFileResultSetIterator.Row row = it.next();
- assertThat(row.getLineUpdateRequests().size()).isEqualTo(NUMBER_OF_LINES);
+ FileSourcesUpdaterUtil.Row row = it.next();
+ assertThat(row.getUpdateRequests().size()).isEqualTo(NUMBER_OF_LINES);
assertThat(row.getFileUuid()).isNotEmpty();
counter.incrementAndGet();
}
diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java
index 23db5b1f112..de4c7e274e8 100644
--- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java
+++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java
@@ -102,7 +102,7 @@ public class SourceIndexBenchmarkTest {
// TODO assertions
}
- private static class SourceIterator implements Iterator<SourceFileResultSetIterator.Row> {
+ private static class SourceIterator implements Iterator<FileSourcesUpdaterUtil.Row> {
private final long nbFiles;
private final int nbLinesPerFile;
private int currentProject = 0;
@@ -125,7 +125,7 @@ public class SourceIndexBenchmarkTest {
}
@Override
- public SourceFileResultSetIterator.Row next() {
+ public FileSourcesUpdaterUtil.Row next() {
String projectUuid = "P" + currentProject;
String fileUuid = "FILE" + count.get();
dataBuilder.clear();
@@ -155,7 +155,7 @@ public class SourceIndexBenchmarkTest {
if (count.get() % 500 == 0) {
currentProject++;
}
- return SourceFileResultSetIterator.toRow(projectUuid, fileUuid, new Date(), dataBuilder.build());
+ return SourceLineResultSetIterator.toRow(projectUuid, fileUuid, new Date(), dataBuilder.build());
}
@Override