File tree Expand file tree Collapse file tree
benchmarks/src/main/java/org/dcache/nfs/benchmarks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .dcache .nfs .benchmarks ;
22
33import java .nio .charset .StandardCharsets ;
4- import java .util .Random ;
54import java .util .concurrent .ThreadLocalRandom ;
65import java .util .concurrent .TimeUnit ;
76
7+ import org .dcache .nfs .util .Opaque ;
88import org .dcache .nfs .v4 .StateOwner ;
99import org .dcache .nfs .v4 .nlm .LockException ;
1010import org .dcache .nfs .v4 .nlm .LockManager ;
@@ -41,15 +41,15 @@ public LockManager getLockManager() {
4141 */
4242 @ State (Scope .Thread )
4343 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 ;
4745
4846 public FileHolder () {
49- random .nextBytes (file1 );
47+ byte [] bytes = new byte [16 ];
48+ ThreadLocalRandom .current ().nextBytes (bytes );
49+ file1 = Opaque .forBytes (bytes );
5050 }
5151
52- public byte [] getFile () {
52+ public Opaque getFile () {
5353 return file1 ;
5454 }
5555
You can’t perform that action at this time.
0 commit comments