mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-22 15:13:41 -06:00
restore buffer auto-sizing, with null guard
This commit is contained in:
parent
9e3634e00d
commit
58879666c4
@ -61,11 +61,13 @@ public class StringCompositor implements LongFunction<String> {
|
||||
spans[spans.length - 1] = even_odd_spans[even_odd_spans.length - 1];
|
||||
this.stringfunc = stringfunc;
|
||||
|
||||
// int minsize = 0;
|
||||
// for (int i = 0; i < 100; i++) {
|
||||
// String result = apply(i);
|
||||
// minsize = Math.max(minsize,result.length());
|
||||
// }
|
||||
int minsize = 0;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
String result = apply(i);
|
||||
if (result!=null) {
|
||||
minsize = Math.max(minsize,result.length());
|
||||
}
|
||||
}
|
||||
bufsize = spans.length*1024;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user