Interface TorperfResult

  • All Superinterfaces:
    Descriptor, java.io.Serializable

    public interface TorperfResult
    extends Descriptor
    Contains performance measurement results from making simple HTTP requests over the Tor network.

    The performance measurement service Torperf publishes performance data from making simple HTTP requests over the Tor network. Torperf uses a trivial SOCKS client to download files of various sizes over the Tor network and notes how long substeps take.

    Since:
    1.0.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Boolean didTimeout()
      Return whether the request timed out (as opposed to failing), or null if the torperf line didn't contain that information.
      java.util.List<java.lang.Long> getBuildTimes()
      Return a list of times in milliseconds between launching the circuit and extending to the next circuit hop, or null if the torperf line didn't contain that information.
      int getCircId()
      Return the identifier of the circuit used for this measurement, or -1 if the torperf line didn't contain that information.
      long getConnectMillis()
      Return the time in milliseconds since the epoch when the socket was connected.
      long getDataCompleteMillis()
      Return the time in milliseconds since the epoch when the payload was complete.
      java.util.SortedMap<java.lang.Integer,​java.lang.Long> getDataPercentiles()
      Return the times in milliseconds since the epoch when x% of expected bytes were read for 0 <= x <= 100, or null if the torperf line didn't contain that information.
      long getDataRequestMillis()
      Return the time in milliseconds since the epoch when the HTTP request was written.
      long getDataResponseMillis()
      Return the time in milliseconds since the epoch when the first response was received.
      java.lang.String getEndpointLocal()
      Return the hostname, IP address, and port that the TGen client used to connect to the local tor SOCKS port, formatted as hostname:ip:port, which may be "NULL:0.0.0.0:0" if TGen was not able to find this information or null if the OnionPerf line didn't contain this information.
      java.lang.String getEndpointProxy()
      Return the hostname, IP address, and port that the TGen client used to connect to the SOCKS proxy server that tor runs, formatted as hostname:ip:port, which may be "NULL:0.0.0.0:0" if TGen was not able to find this information or null if the OnionPerf line didn't contain this information.
      java.lang.String getEndpointRemote()
      Return the hostname, IP address, and port that the TGen client used to connect to the remote server, formatted as hostname:ip:port, which may be "NULL:0.0.0.0:0" if TGen was not able to find this information or null if the OnionPerf line didn't contain this information.
      java.lang.String getErrorCode()
      Return the combined error code contained in the tgen client logs and the tor client logs, or null if no error occured or if the OnionPerf line didn't contain this information.
      int getFileSize()
      Return the configured file size in bytes.
      java.lang.String getHostnameLocal()
      Return the client machine hostname, which may be "(NULL)" if the TGen client was not able to find this information or null if the OnionPerf line didn't contain this information.
      java.lang.String getHostnameRemote()
      Return the server machine hostname, which may be "(NULL)" if the TGen server was not able to find this information or null if the OnionPerf line didn't contain this information.
      long getLaunchMillis()
      Return the time in milliseconds since the epoch when the circuit was launched, or -1 if the torperf line didn't contain that information.
      long getNegotiateMillis()
      Return the time in milliseconds since the epoch when SOCKS 5 authentication methods have been negotiated.
      java.util.SortedMap<java.lang.Integer,​java.lang.Long> getPartials()
      Return the times in milliseconds since the epoch when the given number of bytes were read, or null if the torperf line didn't contain that information.
      java.util.List<java.lang.String> getPath()
      Return a list of fingerprints of the relays in the circuit, or null if the torperf line didn't contain that information.
      double getQuantile()
      Return the circuit build time quantile that the Tor client uses to determine its circuit-build timeout, or -1 if the torperf line didn't contain that information.
      int getReadBytes()
      Return the total number of bytes read.
      long getRequestMillis()
      Return the time in milliseconds since the epoch when the SOCKS request was sent.
      long getResponseMillis()
      Return the time in milliseconds since the epoch when the SOCKS response was received.
      long getSocketMillis()
      Return the time in milliseconds since the epoch when the socket was created.
      java.lang.String getSource()
      Return the configured name of the data source.
      java.lang.String getSourceAddress()
      Return the public IP address of the OnionPerf host obtained by connecting to well-known servers and finding the IP address in the result, which may be "unknown" if OnionPerf was not able to find this information or null if the OnionPerf line didn't contain this information.
      long getStartMillis()
      Return the time in milliseconds since the epoch when the connection process started.
      long getTimeout()
      Return the circuit build timeout that the Tor client used when building this circuit, or -1 if the torperf line didn't contain that information.
      java.util.SortedMap<java.lang.String,​java.lang.String> getUnrecognizedKeys()
      Return all unrecognized keys together with their values, or null if all keys were recognized.
      long getUsedAtMillis()
      Return the time in milliseconds since the epoch when the circuit was used, or -1 if the torperf line didn't contain that information.
      int getUsedBy()
      Return the identifier of the stream used for this measurement, or -1 if the torperf line didn't contain that information.
      int getWriteBytes()
      Return the total number of bytes written.
    • Method Detail

      • getUnrecognizedKeys

        java.util.SortedMap<java.lang.String,​java.lang.String> getUnrecognizedKeys()
        Return all unrecognized keys together with their values, or null if all keys were recognized.
        Since:
        1.2.0
      • getSource

        java.lang.String getSource()
        Return the configured name of the data source.
        Since:
        1.0.0
      • getFileSize

        int getFileSize()
        Return the configured file size in bytes.
        Since:
        1.0.0
      • getStartMillis

        long getStartMillis()
        Return the time in milliseconds since the epoch when the connection process started.
        Since:
        1.0.0
      • getSocketMillis

        long getSocketMillis()
        Return the time in milliseconds since the epoch when the socket was created.
        Since:
        1.0.0
      • getConnectMillis

        long getConnectMillis()
        Return the time in milliseconds since the epoch when the socket was connected.
        Since:
        1.0.0
      • getNegotiateMillis

        long getNegotiateMillis()
        Return the time in milliseconds since the epoch when SOCKS 5 authentication methods have been negotiated.
        Since:
        1.0.0
      • getRequestMillis

        long getRequestMillis()
        Return the time in milliseconds since the epoch when the SOCKS request was sent.
        Since:
        1.0.0
      • getResponseMillis

        long getResponseMillis()
        Return the time in milliseconds since the epoch when the SOCKS response was received.
        Since:
        1.0.0
      • getDataRequestMillis

        long getDataRequestMillis()
        Return the time in milliseconds since the epoch when the HTTP request was written.
        Since:
        1.0.0
      • getDataResponseMillis

        long getDataResponseMillis()
        Return the time in milliseconds since the epoch when the first response was received.
        Since:
        1.0.0
      • getDataCompleteMillis

        long getDataCompleteMillis()
        Return the time in milliseconds since the epoch when the payload was complete.
        Since:
        1.0.0
      • getWriteBytes

        int getWriteBytes()
        Return the total number of bytes written.
        Since:
        1.0.0
      • getReadBytes

        int getReadBytes()
        Return the total number of bytes read.
        Since:
        1.0.0
      • didTimeout

        java.lang.Boolean didTimeout()
        Return whether the request timed out (as opposed to failing), or null if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getPartials

        java.util.SortedMap<java.lang.Integer,​java.lang.Long> getPartials()
        Return the times in milliseconds since the epoch when the given number of bytes were read, or null if the torperf line didn't contain that information.
        Since:
        2.13.0
      • getDataPercentiles

        java.util.SortedMap<java.lang.Integer,​java.lang.Long> getDataPercentiles()
        Return the times in milliseconds since the epoch when x% of expected bytes were read for 0 <= x <= 100, or null if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getLaunchMillis

        long getLaunchMillis()
        Return the time in milliseconds since the epoch when the circuit was launched, or -1 if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getUsedAtMillis

        long getUsedAtMillis()
        Return the time in milliseconds since the epoch when the circuit was used, or -1 if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getPath

        java.util.List<java.lang.String> getPath()
        Return a list of fingerprints of the relays in the circuit, or null if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getBuildTimes

        java.util.List<java.lang.Long> getBuildTimes()
        Return a list of times in milliseconds between launching the circuit and extending to the next circuit hop, or null if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getTimeout

        long getTimeout()
        Return the circuit build timeout that the Tor client used when building this circuit, or -1 if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getQuantile

        double getQuantile()
        Return the circuit build time quantile that the Tor client uses to determine its circuit-build timeout, or -1 if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getCircId

        int getCircId()
        Return the identifier of the circuit used for this measurement, or -1 if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getUsedBy

        int getUsedBy()
        Return the identifier of the stream used for this measurement, or -1 if the torperf line didn't contain that information.
        Since:
        1.0.0
      • getEndpointLocal

        java.lang.String getEndpointLocal()
        Return the hostname, IP address, and port that the TGen client used to connect to the local tor SOCKS port, formatted as hostname:ip:port, which may be "NULL:0.0.0.0:0" if TGen was not able to find this information or null if the OnionPerf line didn't contain this information.
        Since:
        1.7.0
      • getEndpointProxy

        java.lang.String getEndpointProxy()
        Return the hostname, IP address, and port that the TGen client used to connect to the SOCKS proxy server that tor runs, formatted as hostname:ip:port, which may be "NULL:0.0.0.0:0" if TGen was not able to find this information or null if the OnionPerf line didn't contain this information.
        Since:
        1.7.0
      • getEndpointRemote

        java.lang.String getEndpointRemote()
        Return the hostname, IP address, and port that the TGen client used to connect to the remote server, formatted as hostname:ip:port, which may be "NULL:0.0.0.0:0" if TGen was not able to find this information or null if the OnionPerf line didn't contain this information.
        Since:
        1.7.0
      • getHostnameLocal

        java.lang.String getHostnameLocal()
        Return the client machine hostname, which may be "(NULL)" if the TGen client was not able to find this information or null if the OnionPerf line didn't contain this information.
        Since:
        1.7.0
      • getHostnameRemote

        java.lang.String getHostnameRemote()
        Return the server machine hostname, which may be "(NULL)" if the TGen server was not able to find this information or null if the OnionPerf line didn't contain this information.
        Since:
        1.7.0
      • getSourceAddress

        java.lang.String getSourceAddress()
        Return the public IP address of the OnionPerf host obtained by connecting to well-known servers and finding the IP address in the result, which may be "unknown" if OnionPerf was not able to find this information or null if the OnionPerf line didn't contain this information.
        Since:
        1.7.0
      • getErrorCode

        java.lang.String getErrorCode()
        Return the combined error code contained in the tgen client logs and the tor client logs, or null if no error occured or if the OnionPerf line didn't contain this information.
        Since:
        2.14.0