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



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/webkit_remote/client/network_events.rb', line 483

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



458
459
460
# File 'lib/webkit_remote/client/network_events.rb', line 458

def connect_end_ms
  @connect_end_ms
end

#connect_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the TCP connection started being established



454
455
456
# File 'lib/webkit_remote/client/network_events.rb', line 454

def connect_start_ms
  @connect_start_ms
end

#dns_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the server DNS resolution completed



442
443
444
# File 'lib/webkit_remote/client/network_events.rb', line 442

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



438
439
440
# File 'lib/webkit_remote/client/network_events.rb', line 438

def dns_start_ms
  @dns_start_ms
end

#proxy_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the proxy DNS resolution completed



450
451
452
# File 'lib/webkit_remote/client/network_events.rb', line 450

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



446
447
448
# File 'lib/webkit_remote/client/network_events.rb', line 446

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



477
478
479
# File 'lib/webkit_remote/client/network_events.rb', line 477

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



473
474
475
# File 'lib/webkit_remote/client/network_events.rb', line 473

def send_end_ms
  @send_end_ms
end

#send_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the HTTP request started being transmitted



469
470
471
# File 'lib/webkit_remote/client/network_events.rb', line 469

def send_start_ms
  @send_start_ms
end

#ssl_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the SSL handshake completed



465
466
467
# File 'lib/webkit_remote/client/network_events.rb', line 465

def ssl_end_ms
  @ssl_end_ms
end

#ssl_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the start of the SSL handshake



462
463
464
# File 'lib/webkit_remote/client/network_events.rb', line 462

def ssl_start_ms
  @ssl_start_ms
end

#timeObject (readonly)

Parameters:

  • baseline (Number)

    time for the HTTP request used to fetch a resource



434
435
436
# File 'lib/webkit_remote/client/network_events.rb', line 434

def time
  @time
end