diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-03-20 08:43:03 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-03-20 08:43:11 +0100 |
commit | 064a699b7a3843cc11be3ffd27f4f5c52ac2563c (patch) | |
tree | ac679715f691934832228d6737b2e83c03b6ea8b /server/sonar-server-benchmarks | |
parent | ee5860395a505e9acee4a3908e1c7df3c9541536 (diff) | |
download | sonarqube-064a699b7a3843cc11be3ffd27f4f5c52ac2563c.tar.gz sonarqube-064a699b7a3843cc11be3ffd27f4f5c52ac2563c.zip |
Improve memory consumption of SourceDbBenchmarkTest and fix EsUtilsTest on GMT TZ
Diffstat (limited to 'server/sonar-server-benchmarks')
-rw-r--r-- | server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java | 6 |
1 files changed, 4 insertions, 2 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 1e244992e02..389c29b740f 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 @@ -116,8 +116,10 @@ public class SourceDbBenchmarkTest { private byte[] generateData() throws IOException { FileSourceDb.Data.Builder dataBuilder = FileSourceDb.Data.newBuilder(); + FileSourceDb.Line.Builder lineBuilder = FileSourceDb.Line.newBuilder(); for (int i = 1; i <= NUMBER_OF_LINES; i++) { - dataBuilder.addLinesBuilder() + lineBuilder.clear(); + dataBuilder.addLines(lineBuilder .setLine(i) .setScmRevision("REVISION_" + i) .setScmAuthor("a_guy") @@ -134,7 +136,7 @@ public class SourceDbBenchmarkTest { .setScmDate(1_500_000_000_000L) .setHighlighting("2,9,k;9,18,k") .addAllDuplication(Arrays.asList(19, 33, 141)) - .build(); + .build()); } return FileSourceDto.encodeData(dataBuilder.build()); } |