Class: Google::Apis::ChromeuxreportV1::Metric

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Metric

Returns a new instance of Metric.



209
210
211
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 209

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

Instance Attribute Details

#histogramArray<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



200
201
202
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 200

def histogram
  @histogram
end

#percentilesGoogle::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



207
208
209
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 207

def percentiles
  @percentiles
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



214
215
216
217
# File 'lib/google/apis/chromeuxreport_v1/classes.rb', line 214

def update!(**args)
  @histogram = args[:histogram] if args.key?(:histogram)
  @percentiles = args[:percentiles] if args.key?(:percentiles)
end