Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for CallStart (0.17 sec)

  1. docs/features/events.md

        long nowNanos = System.nanoTime();
        if (name.equals("callStart")) {
          callStartNanos = nowNanos;
        }
        long elapsedNanos = nowNanos - callStartNanos;
        System.out.printf("%.3f %s%n", elapsedNanos / 1000000000d, name);
      }
    
      @Override public void callStart(Call call) {
        printEvent("callStart");
      }
    
      @Override public void callEnd(Call call) {
        printEvent("callEnd");
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

      EventListener.Factory {
      private var startNs: Long? = null
    
      override fun create(call: Call): EventListener = this
    
      override fun callStart(call: Call) {
        startNs = System.nanoTime()
    
        logWithTime("callStart: ${call.request()}")
    
        delegate.callStart(call)
      }
    
      override fun proxySelectStart(
        call: Call,
        url: HttpUrl,
      ) {
        logWithTime("proxySelectStart: $url")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  3. docs/features/caching.md

    containing a query.
    
     - CallStart
     - **CacheHit**
     - CallEnd
     
    ### Cache Miss
    
    Under a cache miss the normal request events are seen but an additional event shows the presence of the cache.
    Cache Miss will be typical if the item has not been read from the network, is uncacheable, or is past it's 
    lifetime based on Response cache headers.
    
     - CallStart 
     - **CacheMiss**
     - ProxySelectStart
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        call.execute().use { response ->
          assertThat(response.body.string()).isEqualTo("abc")
        }
    
        val expectedEvents = mutableListOf<String>()
        // Start out with standard events...
        expectedEvents += "CallStart"
        expectedEvents += "ProxySelectStart"
        expectedEvents += "ProxySelectEnd"
        expectedEvents += "DnsStart"
        expectedEvents += "DnsEnd"
        expectedEvents += "ConnectStart"
        if (https) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java

        }
    
        @Override public void proxySelectEnd(Call call, HttpUrl url, List<Proxy> proxies) {
          printEvent("proxySelectEnd");
        }
    
        @Override public void callStart(Call call) {
          printEvent("callStart");
        }
    
        @Override public void dnsStart(Call call, String domainName) {
          printEvent("dnsStart");
        }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

      override fun connectionReleased(
        call: Call,
        connection: Connection,
      ) = logEvent(ConnectionReleased(System.nanoTime(), call, connection))
    
      override fun callStart(call: Call) = logEvent(CallStart(System.nanoTime(), call))
    
      override fun requestHeadersStart(call: Call) = logEvent(RequestHeadersStart(System.nanoTime(), call))
    
      override fun requestHeadersEnd(
        call: Call,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  7. samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java

          long nowNanos = System.nanoTime();
          if (name.equals("callStart")) {
            callStartNanos = nowNanos;
          }
          long elapsedNanos = nowNanos - callStartNanos;
          System.out.printf("%.3f %s%n", elapsedNanos / 1000000000d, name);
        }
    
        @Override public void callStart(Call call) {
          printEvent("callStart");
        }
    
        @Override public void proxySelectStart(Call call, HttpUrl url) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 5.3K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

     */
    class LoggingEventListener private constructor(
      private val logger: HttpLoggingInterceptor.Logger,
    ) : EventListener() {
      private var startNs: Long = 0
    
      override fun callStart(call: Call) {
        startNs = System.nanoTime()
    
        logWithTime("callStart: ${call.request()}")
      }
    
      override fun proxySelectStart(
        call: Call,
        url: HttpUrl,
      ) {
        logWithTime("proxySelectStart: $url")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  9. okhttp-android/src/test/kotlin/okhttp3/android/AndroidLoggingTest.kt

        assertThat(
          logs.map {
            it.msg.replace(
              "\\[\\d+ ms] ".toRegex(),
              "",
            )
          },
        ).containsExactly(
          "callStart: Request{method=GET, url=http://google.com/robots.txt}",
          "proxySelectStart: http://google.com/",
          "proxySelectEnd: [DIRECT]",
          "dnsStart: google.com",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  10. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
Back to top