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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/chromeuxreport_v1/classes.rb,
generated/google/apis/chromeuxreport_v1/representations.rb,
generated/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.



128
129
130
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 128

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



119
120
121
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 119

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



126
127
128
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 126

def percentiles
  @percentiles
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



133
134
135
136
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 133

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