Class: Google::Apis::PagespeedonlineV5::UserPageLoadMetricV5

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

Overview

A CrUX metric object for a single metric and form factor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UserPageLoadMetricV5

Returns a new instance of UserPageLoadMetricV5.



1080
1081
1082
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1080

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

Instance Attribute Details

#categoryString

The category of the specific time metric. Corresponds to the JSON property category

Returns:

  • (String)


1052
1053
1054
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1052

def category
  @category
end

#distributionsArray<Google::Apis::PagespeedonlineV5::Bucket>

Metric distributions. Proportions should sum up to 1. Corresponds to the JSON property distributions



1057
1058
1059
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1057

def distributions
  @distributions
end

#form_factorString

Identifies the form factor of the metric being collected. Corresponds to the JSON property formFactor

Returns:

  • (String)


1062
1063
1064
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1062

def form_factor
  @form_factor
end

#medianFixnum

The median number of the metric, in millisecond. Corresponds to the JSON property median

Returns:

  • (Fixnum)


1067
1068
1069
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1067

def median
  @median
end

#metric_idString

Identifies the type of the metric. Corresponds to the JSON property metricId

Returns:

  • (String)


1072
1073
1074
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1072

def metric_id
  @metric_id
end

#percentileFixnum

We use this field to store certain percentile value for this metric. For v4, this field contains pc50. For v5, this field contains pc90. Corresponds to the JSON property percentile

Returns:

  • (Fixnum)


1078
1079
1080
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1078

def percentile
  @percentile
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1085
1086
1087
1088
1089
1090
1091
1092
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 1085

def update!(**args)
  @category = args[:category] if args.key?(:category)
  @distributions = args[:distributions] if args.key?(:distributions)
  @form_factor = args[:form_factor] if args.key?(:form_factor)
  @median = args[:median] if args.key?(:median)
  @metric_id = args[:metric_id] if args.key?(:metric_id)
  @percentile = args[:percentile] if args.key?(:percentile)
end