Class: WebkitRemote::Client::NetworkResourceTiming

Inherits:
Object
  • Object
show all
Defined in:
lib/webkit_remote/client/network_events.rb

Overview

Wraps timing information for network events.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_timing) ⇒ NetworkResourceTiming

Returns a new instance of NetworkResourceTiming.

Parameters:

  • the (Hash<String, Number>)

    raw RPC data for a ResourceTiming object in the Network domain



532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
# File 'lib/webkit_remote/client/network_events.rb', line 532

def initialize(raw_timing)
  @time = raw_timing['requestTime'].to_f

  @connect_start_ms = raw_timing['connectStart'].to_f
  @connect_end_ms = raw_timing['connectEnd'].to_f
  @dns_start_ms = raw_timing['dnsStart'].to_f
  @dns_end_ms = raw_timing['dnsEnd'].to_f
  @proxy_start_ms = raw_timing['proxyStart'].to_f
  @proxy_end_ms = raw_timing['proxyEnd'].to_f
  @receive_headers_end_ms = raw_timing['receiveHeadersEnd'].to_f
  @send_start_ms = raw_timing['sendStart'].to_f
  @send_end_ms = raw_timing['sendEnd'].to_f
  @ssl_start_ms = raw_timing['sslStart'].to_f
  @ssl_end_ms = raw_timing['sslEnd'].to_f
end

Instance Attribute Details

#connect_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the TCP connection was established



507
508
509
# File 'lib/webkit_remote/client/network_events.rb', line 507

def connect_end_ms
  @connect_end_ms
end

#connect_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the TCP connection started being established



503
504
505
# File 'lib/webkit_remote/client/network_events.rb', line 503

def connect_start_ms
  @connect_start_ms
end

#dns_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the server DNS resolution completed



491
492
493
# File 'lib/webkit_remote/client/network_events.rb', line 491

def dns_end_ms
  @dns_end_ms
end

#dns_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the start of the server DNS resolution



487
488
489
# File 'lib/webkit_remote/client/network_events.rb', line 487

def dns_start_ms
  @dns_start_ms
end

#proxy_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the proxy DNS resolution completed



499
500
501
# File 'lib/webkit_remote/client/network_events.rb', line 499

def proxy_end_ms
  @proxy_end_ms
end

#proxy_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the start of the proxy DNS resolution



495
496
497
# File 'lib/webkit_remote/client/network_events.rb', line 495

def proxy_start_ms
  @proxy_start_ms
end

#receive_headers_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until all the response HTTP headers were received



526
527
528
# File 'lib/webkit_remote/client/network_events.rb', line 526

def receive_headers_end_ms
  @receive_headers_end_ms
end

#send_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the HTTP request finished transmitting



522
523
524
# File 'lib/webkit_remote/client/network_events.rb', line 522

def send_end_ms
  @send_end_ms
end

#send_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the HTTP request started being transmitted



518
519
520
# File 'lib/webkit_remote/client/network_events.rb', line 518

def send_start_ms
  @send_start_ms
end

#ssl_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the SSL handshake completed



514
515
516
# File 'lib/webkit_remote/client/network_events.rb', line 514

def ssl_end_ms
  @ssl_end_ms
end

#ssl_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the start of the SSL handshake



511
512
513
# File 'lib/webkit_remote/client/network_events.rb', line 511

def ssl_start_ms
  @ssl_start_ms
end

#timeObject (readonly)

Parameters:

  • baseline (Number)

    time for the HTTP request used to fetch a resource



483
484
485
# File 'lib/webkit_remote/client/network_events.rb', line 483

def time
  @time
end