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



477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/webkit_remote/client/network_events.rb', line 477

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



452
453
454
# File 'lib/webkit_remote/client/network_events.rb', line 452

def connect_end_ms
  @connect_end_ms
end

#connect_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the TCP connection started being established



448
449
450
# File 'lib/webkit_remote/client/network_events.rb', line 448

def connect_start_ms
  @connect_start_ms
end

#dns_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the server DNS resolution completed



436
437
438
# File 'lib/webkit_remote/client/network_events.rb', line 436

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



432
433
434
# File 'lib/webkit_remote/client/network_events.rb', line 432

def dns_start_ms
  @dns_start_ms
end

#proxy_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the proxy DNS resolution completed



444
445
446
# File 'lib/webkit_remote/client/network_events.rb', line 444

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



440
441
442
# File 'lib/webkit_remote/client/network_events.rb', line 440

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



471
472
473
# File 'lib/webkit_remote/client/network_events.rb', line 471

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



467
468
469
# File 'lib/webkit_remote/client/network_events.rb', line 467

def send_end_ms
  @send_end_ms
end

#send_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the HTTP request started being transmitted



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

def send_start_ms
  @send_start_ms
end

#ssl_end_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the SSL handshake completed



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

def ssl_end_ms
  @ssl_end_ms
end

#ssl_start_msObject (readonly)

Parameters:

  • milliseconds (Number)

    from #time until the start of the SSL handshake



456
457
458
# File 'lib/webkit_remote/client/network_events.rb', line 456

def ssl_start_ms
  @ssl_start_ms
end

#timeObject (readonly)

Parameters:

  • baseline (Number)

    time for the HTTP request used to fetch a resource



428
429
430
# File 'lib/webkit_remote/client/network_events.rb', line 428

def time
  @time
end