Package com.google.code.http4j.utils

Examples of com.google.code.http4j.utils.MetricsRecorder


    out.flush();
  }
 
  @Override
  public void write(byte[] b) throws IOException {
    MetricsRecorder recorder = ThreadLocalMetricsRecorder.getInstance();
    recorder.getRequestTimer().start();
    out.write(b);
    recorder.getRequestTransportCounter().addAndGet((long) b.length);
  }
View Full Code Here


  public InputStreamWrapper(InputStream in) {
    this.in = new DataInputStream(in);
  }

  public int read() throws IOException {
    MetricsRecorder recorder = ThreadLocalMetricsRecorder.getInstance();
    int b = in.read();
    if (recorder.getResponseTransportCounter().addAndGet(1L) == 1) {
      recorder.getResponseTimer().start();
    }
    return b;
  }
View Full Code Here

  public InputStreamWrapper(InputStream in) {
    this.in = new DataInputStream(in);
  }

  public int read() throws IOException {
    MetricsRecorder recorder = ThreadLocalMetricsRecorder.getInstance();
    int b = in.read();
    if (recorder.getResponseTransportCounter().addAndGet(1l) == 1) {
      recorder.getResponseTimer().start();
    }
    return b;
  }
View Full Code Here

TOP

Related Classes of com.google.code.http4j.utils.MetricsRecorder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.