Class: Google::Apis::ChromeuxreportV1::Metric
- Inherits:
-
Object
- Object
- Google::Apis::ChromeuxreportV1::Metric
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/chromeuxreport_v1/classes.rb,
lib/google/apis/chromeuxreport_v1/representations.rb,
lib/google/apis/chromeuxreport_v1/representations.rb
Overview
A metric
is a set of user experience data for a single web performance
metric, like "first contentful paint". It contains a summary histogram of real
world Chrome usage as a series of bins
.
Instance Attribute Summary collapse
-
#fractions ⇒ Hash<String,Float>
For enum metrics, provides fractions which add up to approximately 1.0.
-
#histogram ⇒ Array<Google::Apis::ChromeuxreportV1::Bin>
The histogram of user experiences for a metric.
-
#percentiles ⇒ Google::Apis::ChromeuxreportV1::Percentiles
Percentiles contains synthetic values of a metric at a given statistical percentile.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Metric
constructor
A new instance of Metric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Metric
Returns a new instance of Metric.
312 313 314 |
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 312 def initialize(**args) update!(**args) end |
Instance Attribute Details
#fractions ⇒ Hash<String,Float>
For enum metrics, provides fractions which add up to approximately 1.0.
Corresponds to the JSON property fractions
297 298 299 |
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 297 def fractions @fractions end |
#histogram ⇒ Array<Google::Apis::ChromeuxreportV1::Bin>
The histogram of user experiences for a metric. The histogram will have at
least one bin and the densities of all bins will add up to ~1.
Corresponds to the JSON property histogram
303 304 305 |
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 303 def histogram @histogram end |
#percentiles ⇒ Google::Apis::ChromeuxreportV1::Percentiles
Percentiles contains synthetic values of a metric at a given statistical
percentile. These are used for estimating a metric's value as experienced by a
percentage of users out of the total number of users.
Corresponds to the JSON property percentiles
310 311 312 |
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 310 def percentiles @percentiles end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
317 318 319 320 321 |
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 317 def update!(**args) @fractions = args[:fractions] if args.key?(:fractions) @histogram = args[:histogram] if args.key?(:histogram) @percentiles = args[:percentiles] if args.key?(:percentiles) end |