Skip to content

Commit ff4f2b5

Browse files
committed
1 parent 063fff7 commit ff4f2b5

12 files changed

Lines changed: 35 additions & 51 deletions

File tree

src/main/java/org/lmdbjava/bench/Chronicle.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
@Warmup(iterations = 3)
5252
@Measurement(iterations = 3)
5353
@BenchmarkMode(SampleTime)
54-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension"})
54+
5555
public class Chronicle {
5656

5757
// Chroncile Map does not provide ordered keys, so no CRC/XXH64/rev/prev test
@@ -73,7 +73,7 @@ public void write(final Writer w, final Blackhole bh) {
7373
}
7474

7575
@State(value = Benchmark)
76-
@SuppressWarnings("checkstyle:visibilitymodifier")
76+
7777
public static class CommonChroncileMap extends Common {
7878

7979
ChronicleMap<byte[], byte[]> map;
@@ -152,7 +152,6 @@ public void teardown() throws IOException {
152152
}
153153
}
154154

155-
@SuppressWarnings("checkstyle:javadoctype")
156155
@State(Benchmark)
157156
public static class Writer extends CommonChroncileMap {
158157

src/main/java/org/lmdbjava/bench/Common.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
* to compliance requirements with JMH {@link Param} and {@link State}.
4848
*/
4949
@State(Benchmark)
50-
@SuppressWarnings({"checkstyle:designforextension",
51-
"checkstyle:visibilitymodifier"})
5250
public class Common {
5351

5452
static final byte[] RND_MB = new byte[1_048_576];
@@ -160,7 +158,6 @@ public void teardown() throws IOException {
160158
rmdir(TMP_BENCH);
161159
}
162160

163-
@SuppressWarnings("UseOfSystemOutOrSystemErr")
164161
protected void reportSpaceUsed(final File dir, final String desc) {
165162
final File[] files = dir.listFiles();
166163
if (files == null) {
@@ -190,7 +187,7 @@ private File create(final BenchmarkParams b, final String suffix) {
190187
return f;
191188
}
192189

193-
@SuppressWarnings("checkstyle:ReturnCount")
190+
194191
private void rmdir(final File file) {
195192
if (!file.exists()) {
196193
return;

src/main/java/org/lmdbjava/bench/CommonLmdbJava.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
* @param <T> buffer type
5050
*/
5151
@State(Benchmark)
52-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension",
53-
"checkstyle:visibilitymodifier"})
5452
public class CommonLmdbJava<T> extends Common {
5553

5654
static final int POSIX_MODE = 664;

src/main/java/org/lmdbjava/bench/LevelDb.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
@Warmup(iterations = 3)
6060
@Measurement(iterations = 3)
6161
@BenchmarkMode(SampleTime)
62-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension"})
62+
6363
public class LevelDb {
6464

6565
@Benchmark
@@ -126,7 +126,7 @@ public void write(final Writer w, final Blackhole bh) throws IOException {
126126
}
127127

128128
@State(value = Benchmark)
129-
@SuppressWarnings("checkstyle:visibilitymodifier")
129+
130130
public static class CommonLevelDb extends Common {
131131

132132
DB db;
@@ -161,7 +161,6 @@ public void teardown() throws IOException {
161161
super.teardown();
162162
}
163163

164-
@SuppressWarnings("PMD.CloseResource")
165164
void write(final int batchSize) throws IOException {
166165
final int rndByteMax = RND_MB.length - valSize;
167166
int rndByteOffset = 0;
@@ -212,7 +211,7 @@ public void teardown() throws IOException {
212211
}
213212

214213
@State(Benchmark)
215-
@SuppressWarnings("checkstyle:visibilitymodifier")
214+
216215
public static class Writer extends CommonLevelDb {
217216

218217
@Param("1000000")

src/main/java/org/lmdbjava/bench/LmdbJavaAgrona.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
@Warmup(iterations = 3)
6767
@Measurement(iterations = 3)
6868
@BenchmarkMode(SampleTime)
69-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension"})
69+
7070
public class LmdbJavaAgrona {
7171

7272
@Benchmark
@@ -128,7 +128,7 @@ public void write(final Writer w, final Blackhole bh) {
128128
}
129129

130130
@State(Benchmark)
131-
@SuppressWarnings("checkstyle:visibilitymodifier")
131+
132132
public static class LmdbJava extends CommonLmdbJava<DirectBuffer> {
133133

134134
/**
@@ -157,7 +157,6 @@ public void setup(final BenchmarkParams b, final boolean sync) throws
157157
rwVal = new UnsafeBuffer(allocateDirect(valSize));
158158
}
159159

160-
@SuppressWarnings("PMD.NullAssignment")
161160
void write() {
162161
try (Txn<DirectBuffer> tx = env.txnWrite()) {
163162
try (Cursor<DirectBuffer> c = db.openCursor(tx);) {
@@ -189,7 +188,7 @@ void write() {
189188
}
190189

191190
@State(Benchmark)
192-
@SuppressWarnings("checkstyle:visibilitymodifier")
191+
193192
public static class Reader extends LmdbJava {
194193

195194
Cursor<DirectBuffer> c;
@@ -220,7 +219,7 @@ public void teardown() throws IOException {
220219
}
221220

222221
@State(Benchmark)
223-
@SuppressWarnings("checkstyle:visibilitymodifier")
222+
224223
public static class Writer extends LmdbJava {
225224

226225
/**

src/main/java/org/lmdbjava/bench/LmdbJavaByteBuffer.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
@Warmup(iterations = 3)
6363
@Measurement(iterations = 3)
6464
@BenchmarkMode(SampleTime)
65-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension"})
65+
6666
public class LmdbJavaByteBuffer {
6767

6868
@Benchmark
@@ -124,7 +124,7 @@ public void write(final Writer w, final Blackhole bh) {
124124
}
125125

126126
@State(Benchmark)
127-
@SuppressWarnings("checkstyle:visibilitymodifier")
127+
128128
public static class LmdbJava extends CommonLmdbJava<ByteBuffer> {
129129

130130
ByteBuffer rwKey;
@@ -138,7 +138,6 @@ public void setup(final BenchmarkParams b, final boolean sync) throws
138138
rwVal = allocateDirect(valSize);
139139
}
140140

141-
@SuppressWarnings("PMD.NullAssignment")
142141
void write() {
143142
try (Txn<ByteBuffer> tx = env.txnWrite();) {
144143
try (Cursor<ByteBuffer> c = db.openCursor(tx);) {
@@ -175,7 +174,7 @@ void write() {
175174
}
176175

177176
@State(Benchmark)
178-
@SuppressWarnings("checkstyle:visibilitymodifier")
177+
179178
public static class Reader extends LmdbJava {
180179

181180
Cursor<ByteBuffer> c;
@@ -208,7 +207,7 @@ public void teardown() throws IOException {
208207
}
209208

210209
@State(Benchmark)
211-
@SuppressWarnings("checkstyle:visibilitymodifier")
210+
212211
public static class Writer extends LmdbJava {
213212

214213
/**

src/main/java/org/lmdbjava/bench/LmdbJni.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
@Warmup(iterations = 3)
6464
@Measurement(iterations = 3)
6565
@BenchmarkMode(SampleTime)
66-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension"})
66+
6767
public class LmdbJni {
6868

6969
@Benchmark
@@ -126,7 +126,7 @@ public void write(final Writer w, final Blackhole bh) {
126126
}
127127

128128
@State(value = Benchmark)
129-
@SuppressWarnings("checkstyle:visibilitymodifier")
129+
130130
public static class CommonLmdbJni extends Common {
131131

132132
Database db;
@@ -227,7 +227,7 @@ void write() {
227227
}
228228

229229
@State(Benchmark)
230-
@SuppressWarnings("checkstyle:visibilitymodifier")
230+
231231
public static class Reader extends CommonLmdbJni {
232232

233233
BufferCursor c;
@@ -252,7 +252,7 @@ public void teardown() throws IOException {
252252
}
253253

254254
@State(Benchmark)
255-
@SuppressWarnings("checkstyle:visibilitymodifier")
255+
256256
public static class Writer extends CommonLmdbJni {
257257

258258
/**

src/main/java/org/lmdbjava/bench/LmdbLwjgl.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@
8383
@Warmup(iterations = 3)
8484
@Measurement(iterations = 3)
8585
@BenchmarkMode(SampleTime)
86-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension",
87-
"PMD.CloseResource"})
8886
public class LmdbLwjgl {
8987

9088
@Benchmark
@@ -178,7 +176,7 @@ public void write(final Writer w, final Blackhole bh) {
178176
}
179177

180178
@State(Benchmark)
181-
@SuppressWarnings("checkstyle:visibilitymodifier")
179+
182180
public static class CommonLmdbLwjgl extends Common {
183181

184182
private static final int POSIX_MODE = 664;
@@ -192,7 +190,7 @@ public static class CommonLmdbLwjgl extends Common {
192190
@Param("true")
193191
boolean writeMap;
194192

195-
@SuppressWarnings("checkstyle:methodname")
193+
196194
static void E(final int rc) {
197195
if (rc != MDB_SUCCESS) {
198196
throw new IllegalStateException(mdb_strerror(rc));
@@ -309,7 +307,7 @@ void write() {
309307
}
310308

311309
@State(Benchmark)
312-
@SuppressWarnings("checkstyle:visibilitymodifier")
310+
313311
public static class Reader extends CommonLmdbLwjgl {
314312

315313
long c;
@@ -342,7 +340,7 @@ public void teardown() throws IOException {
342340
}
343341

344342
@State(Benchmark)
345-
@SuppressWarnings("checkstyle:visibilitymodifier")
343+
346344
public static class Writer extends CommonLmdbLwjgl {
347345

348346
/**

src/main/java/org/lmdbjava/bench/MapDb.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
@Warmup(iterations = 3)
5757
@Measurement(iterations = 3)
5858
@BenchmarkMode(SampleTime)
59-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension"})
59+
6060
public class MapDb {
6161

6262
@Benchmark
@@ -120,7 +120,7 @@ public void write(final Writer w, final Blackhole bh) {
120120
}
121121

122122
@State(value = Benchmark)
123-
@SuppressWarnings("checkstyle:visibilitymodifier")
123+
124124
public static class CommonMapDb extends Common {
125125

126126
DB db;

src/main/java/org/lmdbjava/bench/MvStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
@Warmup(iterations = 3)
5555
@Measurement(iterations = 3)
5656
@BenchmarkMode(SampleTime)
57-
@SuppressWarnings({"checkstyle:javadoctype", "checkstyle:designforextension"})
57+
5858
public class MvStore {
5959

6060
@Benchmark
@@ -118,7 +118,7 @@ public void write(final Writer w, final Blackhole bh) {
118118
}
119119

120120
@State(value = Benchmark)
121-
@SuppressWarnings("checkstyle:visibilitymodifier")
121+
122122
public static class CommonMvStore extends Common {
123123

124124
MVMap<byte[], byte[]> map;

0 commit comments

Comments
 (0)