File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import java .util .Base64 ;
1111import java .util .List ;
1212import java .util .Random ;
13+ import java .util .concurrent .atomic .AtomicLong ;
1314
1415import com .couchbase .client .java .json .JsonArray ;
1516import com .couchbase .client .java .json .JsonObject ;
@@ -33,6 +34,7 @@ public class Hotel {
3334 private List <String > mutate_field_list = new ArrayList <>();
3435
3536 public WorkLoadSettings ws ;
37+ private AtomicLong counter = new AtomicLong (-1 );
3638 private float [] flt_buf ;
3739 private int flt_buf_length ;
3840
@@ -133,6 +135,7 @@ public JsonObject next(String key) {
133135 jsonObject .put ("type" , this .htypes .get (index % htypes .size ()));
134136 jsonObject .put ("url" , this .url .get (index ));
135137 jsonObject .put ("mutate" , this .mutate );
138+ jsonObject .put ("counter" , this .counter .incrementAndGet ());
136139 if (this .ws .mutated > 0 && !this .ws .mutate_field .isEmpty ()){
137140 this .random .setSeed ((key ).hashCode ());
138141 index = this .random .nextInt (4096 );
You can’t perform that action at this time.
0 commit comments