Skip to content

Commit 6fb884b

Browse files
committed
WIP: more inprovements 4/n
1 parent 5f0a72f commit 6fb884b

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/java/Loader.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,17 @@ public static void main(String[] args) throws IOException {
321321
boolean _trackFailures = Boolean.parseBoolean(cmd.getOptionValue("trackFailures", "false"));
322322
if (Integer.parseInt(cmd.getOptionValue("retry", "0")) > 0)
323323
_trackFailures = true;
324-
tm.submit(new WorkLoadGenerate(th_name, dg, clientPool, esClient, cmd.getOptionValue("durability", "NONE"),
324+
WorkLoadGenerate wlg = new WorkLoadGenerate(th_name, dg, clientPool, esClient, cmd.getOptionValue("durability", "NONE"),
325325
Integer.parseInt(cmd.getOptionValue("maxTTL", "0")),
326326
cmd.getOptionValue("maxTTLUnit", "seconds"), _trackFailures,
327-
Integer.parseInt(cmd.getOptionValue("retry", "0")), null));
327+
Integer.parseInt(cmd.getOptionValue("retry", "0")), null);
328+
wlg.set_collection_for_load(
329+
cmd.getOptionValue("bucket"),
330+
cmd.getOptionValue("scope", "_default"),
331+
cmd.getOptionValue("collection", "_default"));
328332
// Reduced startup delay from 500ms to 50ms for faster ramp-up
329333
// With 32 workers: 15.5s → 1.55s startup time
334+
tm.submit(wlg);
330335
TimeUnit.MILLISECONDS.sleep(50);
331336
} catch (Exception e) {
332337
e.printStackTrace();

src/main/java/couchbase/loadgen/WorkLoadGenerate.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ public void actual_run() {
225225
Instant start = Instant.now();
226226
if(dg.ws.creates > 0) {
227227
// Instant st = Instant.now();
228-
System.out.println(dg.ws.batchSize);
229228
List<Tuple2<String, Object>> docs = dg.nextInsertBatch();
230229
// Instant en = Instant.now();
231230
// System.out.println(this.taskName + " Time Taken to generate " + docs.size() + "docs: " + Duration.between(st, en).toMillis() + "ms");

0 commit comments

Comments
 (0)