public GenerateBehavior(GreenRuntime runtime, CharSequence publishTopic, AppendableProxy target, int seed) { this.target = target; this.channel = runtime.newCommandChannel().newPubSubService(publishTopic.toString()); this.rand = new Random(seed); }
public SimpleRest(GreenRuntime runtime, int maxResponseCount, int maxResponseSize) { responseService = runtime .newCommandChannel() .newHTTPResponseService(maxResponseCount, maxResponseSize); }
public HTTPGetBehaviorChained(GreenRuntime runtime, ClientHostPortInstance session) { GreenCommandChannel newCommandChannel = runtime.newCommandChannel(); this.cmd = newCommandChannel.newHTTPClientService(); this.x = newCommandChannel.newPubSubService(); this.session = session; }
callService = newCommandChannel.newPubSubService(CALL_TOPIC, maxInFlight*sessionCount, PUB_MSGS_SIZE); pubService = newCommandChannel.newPubSubService(parallelTracks*2, PUB_MSGS_SIZE); delayService = newCommandChannel.newDelayService(); httpClientService[i] = runtime.newCommandChannel().newHTTPClientService(queueLength, writer!=null ? maxPayloadSize : 0);
/** * * @param parallelInstanceId MsgCommandChannel arg used for GreenCommandChannel(gm, this, 0, parallelInstanceId, pcm) * @param pcm int arg used for GreenCommandChannel(gm, this, 0, parallelInstanceId, pcm) * @param <G> message channel * @return new GreenCommandChannel(gm, this, 0, parallelInstanceId, pcm) */ public <G extends MsgCommandChannel> G newCommandChannel( int parallelInstanceId, PipeConfigManager pcm ) { return (G) new GreenCommandChannel(this, 0, parallelInstanceId, pcm); }
@Override public void declareBehavior(GreenRuntime runtime) { //log the telemetry snapshot upon every pulse final GreenCommandChannel cmd = runtime.newCommandChannel(); runtime.addTimePulseListener("log",(t,i)->{ cmd.logTelemetrySnapshot(); }); }
@Deprecated public <G extends MsgCommandChannel> G newCommandChannel( int features, int parallelInstanceId, PipeConfigManager pcm ) { return (G) new GreenCommandChannel(this, features, parallelInstanceId, pcm); }
public ProductsBehavior(GreenRuntime runtime, int maxProductId) { responseService = runtime.newCommandChannel().newHTTPResponseService(4,256); names = new StringBuilder[maxProductId+1]; int i = names.length; while (--i>=0) { names[i] = new StringBuilder(); } quantity = new long[maxProductId+1]; disabled = new boolean[maxProductId+1]; }
LoadTestProgress(ParallelClientLoadTester parallelClientLoadTester, GreenRuntime runtime) { this.parallelClientLoadTester = parallelClientLoadTester; this.cmd4 = runtime.newCommandChannel().newPubSubService( ParallelClientLoadTester.ENDERS_TOPIC, Math.max(ParallelClientLoadTester.PUB_MSGS, Math.max(16, this.parallelClientLoadTester.maxInFlight) ), ParallelClientLoadTester.PUB_MSGS_SIZE); this.finished = new long[this.parallelClientLoadTester.parallelTracks]; this.timeouts = new long[this.parallelClientLoadTester.parallelTracks]; this.responsesInvalid = new long[this.parallelClientLoadTester.parallelTracks]; }
public HTTPGetBehaviorSingle(GreenRuntime runtime, ClientHostPortInstance session) { this.session = session; GreenCommandChannel cmd = runtime.newCommandChannel(); clientService = cmd.newHTTPClientService(); pubSubService = cmd.newPubSubService(); }
public RestBehaviorLargeResponse(GreenRuntime runtime, AppendableProxy console) { this.cmd = runtime.newCommandChannel().newHTTPResponseService(4,400); this.console = console; }
public TimingBehavior(GreenRuntime runtime, AppendableProxy console) { this.channel = runtime.newCommandChannel().newPubSubService(); this.console = console; this.runtime = runtime; }
public ExternalRequest(GreenRuntime runtime, ClientHostPortInstance session, String path, String topic) { this.clientService = runtime.newCommandChannel().newHTTPClientService(4,400); this.pubSubService = runtime.newCommandChannel().newPubSubService(topic,4,400); this.session = session; this.path = path; }
public RestBehaviorEmptyResponse(GreenRuntime runtime, long nameFieldId, AppendableProxy console) { this.nameFieldId = nameFieldId; this.cmd = runtime.newCommandChannel().newHTTPResponseService(4,400); this.console = console; }
public IngressBehavior(GreenRuntime runtime, String publishTopic) { cmd = runtime.newCommandChannel().newPubSubService(publishTopic); }
public ShutdownRestListener(GreenRuntime runtime, long keyFieldId) { this.newCommandChannel = runtime.newCommandChannel(); this.responseService = newCommandChannel.newHTTPResponseService(); this.keyFieldId = keyFieldId; }
public CountBehavior(GreenRuntime runtime, CharSequence publishTopic) { this.channel = runtime.newCommandChannel().newPubSubService(publishTopic.toString()); this.runtime = runtime; }
public RestBehaviorSmallResponse(GreenRuntime runtime, AppendableProxy console) { this.cmd = runtime.newCommandChannel().newHTTPResponseService(128,400); this.console = console; }
public ProductsBehavior(GreenRuntime runtime, int maxProductId, String topic, Server server) { this.server = server; this.publishService = runtime.newCommandChannel().newPubSubService(topic,4,400); }
public ShutdownRestListener(GreenRuntime runtime) { this.newCommandChannel = runtime.newCommandChannel(); this.responseService = newCommandChannel.newHTTPResponseService(); }