org.apache.http.benchmark

## Class Stats

- java.lang.Object
- - org.apache.http.benchmark.Stats

-     public class Stats
      extends Object

  Helper to gather statistics for an `HttpBenchmark`.
  Since:
    4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Stats()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `finish()`
    `long` | `getContentLength()`
    `long` | `getDuration()` Total execution time measured in nano seconds
    `int` | `getFailureCount()`
    `long` | `getFinishTime()`
    `int` | `getKeepAliveCount()`
    `String` | `getServerName()`
    `long` | `getStartTime()`
    `int` | `getSuccessCount()`
    `long` | `getTotalBytesRecv()`
    `long` | `getTotalBytesSent()`
    `int` | `getWriteErrors()`
    `void` | `incFailureCount()`
    `void` | `incKeepAliveCount()`
    `void` | `incSuccessCount()`
    `void` | `incTotalBytesRecv(long n)`
    `void` | `incTotalBytesSent(long n)`
    `void` | `incWriteErrors()`
    `void` | `setContentLength(long contentLength)`
    `void` | `setServerName(String serverName)`
    `void` | `start()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Stats

          public Stats()

  - ### Method Detail

    - #### start

          public void start()

    - #### finish

          public void finish()

    - #### getFinishTime

          public long getFinishTime()

    - #### getStartTime

          public long getStartTime()

    - #### getDuration

          public long getDuration()

      Total execution time measured in nano seconds
      Returns:
        duration in nanoseconds

    - #### incSuccessCount

          public void incSuccessCount()

    - #### getSuccessCount

          public int getSuccessCount()

    - #### incFailureCount

          public void incFailureCount()

    - #### getFailureCount

          public int getFailureCount()

    - #### incWriteErrors

          public void incWriteErrors()

    - #### getWriteErrors

          public int getWriteErrors()

    - #### incKeepAliveCount

          public void incKeepAliveCount()

    - #### getKeepAliveCount

          public int getKeepAliveCount()

    - #### getTotalBytesRecv

          public long getTotalBytesRecv()

    - #### incTotalBytesRecv

          public void incTotalBytesRecv(long n)

    - #### getTotalBytesSent

          public long getTotalBytesSent()

    - #### incTotalBytesSent

          public void incTotalBytesSent(long n)

    - #### getContentLength

          public long getContentLength()

    - #### setContentLength

          public void setContentLength(long contentLength)

    - #### getServerName

          public String getServerName()

    - #### setServerName

          public void setServerName(String serverName)

Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.