Class: Google::Apis::PagespeedonlineV2::Result::PageStats

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/pagespeedonline_v2/classes.rb,
generated/google/apis/pagespeedonline_v2/representations.rb,
generated/google/apis/pagespeedonline_v2/representations.rb

Overview

Summary statistics for the page, such as number of JavaScript bytes, number of HTML bytes, etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PageStats

Returns a new instance of PageStats.



550
551
552
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 550

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#css_response_bytesFixnum

Number of uncompressed response bytes for CSS resources on the page. Corresponds to the JSON property cssResponseBytes

Returns:

  • (Fixnum)


486
487
488
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 486

def css_response_bytes
  @css_response_bytes
end

#flash_response_bytesFixnum

Number of response bytes for flash resources on the page. Corresponds to the JSON property flashResponseBytes

Returns:

  • (Fixnum)


491
492
493
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 491

def flash_response_bytes
  @flash_response_bytes
end

#html_response_bytesFixnum

Number of uncompressed response bytes for the main HTML document and all iframes on the page. Corresponds to the JSON property htmlResponseBytes

Returns:

  • (Fixnum)


497
498
499
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 497

def html_response_bytes
  @html_response_bytes
end

#image_response_bytesFixnum

Number of response bytes for image resources on the page. Corresponds to the JSON property imageResponseBytes

Returns:

  • (Fixnum)


502
503
504
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 502

def image_response_bytes
  @image_response_bytes
end

#javascript_response_bytesFixnum

Number of uncompressed response bytes for JS resources on the page. Corresponds to the JSON property javascriptResponseBytes

Returns:

  • (Fixnum)


507
508
509
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 507

def javascript_response_bytes
  @javascript_response_bytes
end

#number_css_resourcesFixnum

Number of CSS resources referenced by the page. Corresponds to the JSON property numberCssResources

Returns:

  • (Fixnum)


512
513
514
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 512

def number_css_resources
  @number_css_resources
end

#number_hostsFixnum

Number of unique hosts referenced by the page. Corresponds to the JSON property numberHosts

Returns:

  • (Fixnum)


517
518
519
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 517

def number_hosts
  @number_hosts
end

#number_js_resourcesFixnum

Number of JavaScript resources referenced by the page. Corresponds to the JSON property numberJsResources

Returns:

  • (Fixnum)


522
523
524
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 522

def number_js_resources
  @number_js_resources
end

#number_resourcesFixnum

Number of HTTP resources loaded by the page. Corresponds to the JSON property numberResources

Returns:

  • (Fixnum)


527
528
529
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 527

def number_resources
  @number_resources
end

#number_static_resourcesFixnum

Number of static (i.e. cacheable) resources on the page. Corresponds to the JSON property numberStaticResources

Returns:

  • (Fixnum)


532
533
534
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 532

def number_static_resources
  @number_static_resources
end

#other_response_bytesFixnum

Number of response bytes for other resources on the page. Corresponds to the JSON property otherResponseBytes

Returns:

  • (Fixnum)


537
538
539
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 537

def other_response_bytes
  @other_response_bytes
end

#text_response_bytesFixnum

Number of uncompressed response bytes for text resources not covered by other statistics (i.e non-HTML, non-script, non-CSS resources) on the page. Corresponds to the JSON property textResponseBytes

Returns:

  • (Fixnum)


543
544
545
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 543

def text_response_bytes
  @text_response_bytes
end

#total_request_bytesFixnum

Total size of all request bytes sent by the page. Corresponds to the JSON property totalRequestBytes

Returns:

  • (Fixnum)


548
549
550
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 548

def total_request_bytes
  @total_request_bytes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 555

def update!(**args)
  @css_response_bytes = args[:css_response_bytes] if args.key?(:css_response_bytes)
  @flash_response_bytes = args[:flash_response_bytes] if args.key?(:flash_response_bytes)
  @html_response_bytes = args[:html_response_bytes] if args.key?(:html_response_bytes)
  @image_response_bytes = args[:image_response_bytes] if args.key?(:image_response_bytes)
  @javascript_response_bytes = args[:javascript_response_bytes] if args.key?(:javascript_response_bytes)
  @number_css_resources = args[:number_css_resources] if args.key?(:number_css_resources)
  @number_hosts = args[:number_hosts] if args.key?(:number_hosts)
  @number_js_resources = args[:number_js_resources] if args.key?(:number_js_resources)
  @number_resources = args[:number_resources] if args.key?(:number_resources)
  @number_static_resources = args[:number_static_resources] if args.key?(:number_static_resources)
  @other_response_bytes = args[:other_response_bytes] if args.key?(:other_response_bytes)
  @text_response_bytes = args[:text_response_bytes] if args.key?(:text_response_bytes)
  @total_request_bytes = args[:total_request_bytes] if args.key?(:total_request_bytes)
end