File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
benchmarks/src/main/java/org/dcache/nfs/benchmarks Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
package org .dcache .nfs .benchmarks ;
2
2
3
3
import java .nio .charset .StandardCharsets ;
4
- import java .util .Random ;
5
4
import java .util .concurrent .ThreadLocalRandom ;
6
5
import java .util .concurrent .TimeUnit ;
7
6
7
+ import org .dcache .nfs .util .Opaque ;
8
8
import org .dcache .nfs .v4 .StateOwner ;
9
9
import org .dcache .nfs .v4 .nlm .LockException ;
10
10
import org .dcache .nfs .v4 .nlm .LockManager ;
@@ -41,15 +41,15 @@ public LockManager getLockManager() {
41
41
*/
42
42
@ State (Scope .Thread )
43
43
public static class FileHolder {
44
-
45
- private final Random random = ThreadLocalRandom .current ();
46
- private final byte [] file1 = new byte [16 ];
44
+ private final Opaque file1 ;
47
45
48
46
public FileHolder () {
49
- random .nextBytes (file1 );
47
+ byte [] bytes = new byte [16 ];
48
+ ThreadLocalRandom .current ().nextBytes (bytes );
49
+ file1 = Opaque .forBytes (bytes );
50
50
}
51
51
52
- public byte [] getFile () {
52
+ public Opaque getFile () {
53
53
return file1 ;
54
54
}
55
55
You can’t perform that action at this time.
0 commit comments