examples/dataflow-streaming-benchmark/src/main/java/com/google/cloud/pso/pipeline/StreamingBenchmark.java
/**
   * Runs the pipeline to completion with the specified options. This method does not wait until the
   * pipeline is finished before returning. Invoke {@code result.waitUntilFinish()} on the result
   * object to block until the pipeline is finished running if blocking programmatic execution is
   * required.
   *
   * @param options The execution options.
   * @return The pipeline result.
   */
Runs the pipeline to completion with the specified options. This method does not wait until the
pipeline is finished before returning. Invoke  result.waitUntilFinish() on the result
object to block until the pipeline is finished running if blocking programmatic execution is
required.

@param options The execution options.
@return The pipeline result.
Runs the pipeline to completion with the specified options . This method does not wait until the pipeline is finished before returning . Invoke result . waitUntilFinish () on the result object to block until the pipeline is finished running if blocking programmatic execution is required . @param options The execution options . @return The pipeline result .
public static PipelineResult run(Options options) {
    Pipeline pipeline = Pipeline.create(options);
    /*
     * Steps:
     *  1) Trigger at the supplied QPS
     *  2) Generate messages containing fake data
     *  3) Write messages to Pub/Sub
     */
    pipeline
        .apply(
            "Trigger",
            GenerateSequence.from(0L).withRate(options.getQps(), Duration.standardSeconds(1L)))
        .apply("GenerateMessages", ParDo.of(new MessageGeneratorFn(options.getSchemaLocation())))
        .apply("WriteToPubsub", PubsubIO.writeMessages().to(options.getTopic()));
    return pipeline.run();
  }
public static PipelineResult run ( Options options ) { Pipeline pipeline = Pipeline . create ( options ) ; /*
     * Steps:
     *  1) Trigger at the supplied QPS
     *  2) Generate messages containing fake data
     *  3) Write messages to Pub/Sub
     */ pipeline . apply ( "Trigger" , GenerateSequence . from ( 0L ) . withRate ( options . getQps ( ) , Duration . standardSeconds ( 1L ) ) ) . apply ( "GenerateMessages" , ParDo . of ( new MessageGeneratorFn ( options . getSchemaLocation ( ) ) ) ) . apply ( "WriteToPubsub" , PubsubIO . writeMessages ( ) . to ( options . getTopic ( ) ) ) ; return pipeline . run ( ) ; }
Runs the pipeline to completion with the specified options.
Runs the pipeline to completion with the specified options .
// Create the pipeline