Skip to content

Commit

Permalink
fix: reset RecordingExporter
Browse files Browse the repository at this point in the history
caused slow down of the benchmark
  • Loading branch information
Zelldon committed Apr 17, 2023
1 parent c0f1e28 commit e34af19
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import io.camunda.zeebe.protocol.record.intent.JobIntent;
import io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent;
import io.camunda.zeebe.protocol.record.value.BpmnElementType;
import io.camunda.zeebe.protocol.record.value.JobRecordValue;
import io.camunda.zeebe.scheduler.ActorScheduler;
import io.camunda.zeebe.scheduler.clock.DefaultActorClock;
import io.camunda.zeebe.stream.impl.StreamProcessorMode;
Expand Down Expand Up @@ -173,11 +174,15 @@ public Record<?> measureProcessExecutionTime() {
final long piKey =
new ProcessInstanceClient(streamProcessingComposite).ofBpmnProcessId("process").create();

return RecordingExporter.jobRecords()
.withIntent(JobIntent.CREATED)
.withType("task")
.withProcessInstanceKey(piKey)
.getFirst();
final Record<JobRecordValue> task =
RecordingExporter.jobRecords()
.withIntent(JobIntent.CREATED)
.withType("task")
.withProcessInstanceKey(piKey)
.getFirst();

RecordingExporter.reset();
return task;
// TODO benchmark with completion
// new
// JobClient(streamProcessingComposite).withKey(job.getKey()).withType("task").complete();
Expand Down

0 comments on commit e34af19

Please sign in to comment.