private void prepareSendProcess()

in client/src/main/java/com/google/cloud/solutions/opencensus/client/JettyTestClient.java [107:125]


  private void prepareSendProcess(
      HttpClient httpClient,
      HttpMethod method,
      Function<Integer[], Integer> downStreamFn,
      String fnName)
      throws InterruptedException {
    Tracer tracer = Tracing.getTracer();
    try (Scope scope = tracer.spanBuilder("main").startScopedSpan()) {
      StopWatch s = StopWatch.createStarted();
      byte[] content = new byte[0];
      if (method == HttpMethod.POST) {
        content = TestInstrumentation.getContent(testOptions.bucket());
      }
      byte[] payload = sendWithRetry(httpClient, method, content);
      TestInstrumentation.processPayload(payload, downStreamFn, fnName);
      TestInstrumentation.recordTaggedStat(
          method.toString(), s.getTime(TimeUnit.NANOSECONDS) / 1.0e6);
    }
  }