61
61
public class RocksDb {
62
62
63
63
@ Benchmark
64
+ @ SuppressWarnings ("PMD.CloseResource" )
64
65
public void readCrc (final Reader r , final Blackhole bh ) {
65
66
r .crc .reset ();
66
67
final RocksIterator iterator = r .db .newIterator ();
@@ -87,6 +88,7 @@ public void readKey(final Reader r, final Blackhole bh) throws
87
88
}
88
89
89
90
@ Benchmark
91
+ @ SuppressWarnings ("PMD.CloseResource" )
90
92
public void readRev (final Reader r , final Blackhole bh ) {
91
93
final RocksIterator iterator = r .db .newIterator ();
92
94
iterator .seekToLast ();
@@ -97,6 +99,7 @@ public void readRev(final Reader r, final Blackhole bh) {
97
99
}
98
100
99
101
@ Benchmark
102
+ @ SuppressWarnings ("PMD.CloseResource" )
100
103
public void readSeq (final Reader r , final Blackhole bh ) {
101
104
final RocksIterator iterator = r .db .newIterator ();
102
105
iterator .seekToFirst ();
@@ -107,6 +110,7 @@ public void readSeq(final Reader r, final Blackhole bh) {
107
110
}
108
111
109
112
@ Benchmark
113
+ @ SuppressWarnings ("PMD.CloseResource" )
110
114
public void readXxh64 (final Reader r , final Blackhole bh ) {
111
115
long result = 0 ;
112
116
final RocksIterator iterator = r .db .newIterator ();
@@ -141,6 +145,7 @@ public static class CommonRocksDb extends Common {
141
145
MutableDirectBuffer wvb ;
142
146
143
147
@ Override
148
+ @ SuppressWarnings ("PMD.CloseResource" )
144
149
public void setup (final BenchmarkParams b ) throws IOException {
145
150
super .setup (b );
146
151
wkb = new UnsafeBuffer (new byte [keySize ]);
@@ -165,7 +170,7 @@ public void teardown() throws IOException {
165
170
super .teardown ();
166
171
}
167
172
168
- @ SuppressWarnings ("PMD.CyclomaticComplexity" )
173
+ @ SuppressWarnings ({ "PMD.CyclomaticComplexity" , "PMD.CloseResource" } )
169
174
void write (final int batchSize ) throws IOException {
170
175
final int rndByteMax = RND_MB .length - valSize ;
171
176
int rndByteOffset = 0 ;
0 commit comments