Class: Google::Apis::ChromeuxreportV1::Bin

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 bin is a discrete portion of data spanning from start to end, or if no end is given, then from start to +inf. A bin's start and end values are given in the value type of the metric it represents. For example, "first contentful paint" is measured in milliseconds and exposed as ints, therefore its metric bins will use int32s for its start and end types. However, "cumulative layout shift" is measured in unitless decimals and is exposed as a decimal encoded as a string, therefore its metric bins will use strings for its value type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Bin

Returns a new instance of Bin.



51
52
53
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 51

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

Instance Attribute Details

#densityFloat

The proportion of users that experienced this bin's value for the given metric. Corresponds to the JSON property density

Returns:

  • (Float)


38
39
40
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 38

def density
  @density
end

#endObject

End is the end of the data bin. If end is not populated, then the bin has no end and is valid from start to +inf. Corresponds to the JSON property end

Returns:

  • (Object)


44
45
46
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 44

def end
  @end
end

#startObject

Start is the beginning of the data bin. Corresponds to the JSON property start

Returns:

  • (Object)


49
50
51
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 49

def start
  @start
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



56
57
58
59
60
# File 'generated/google/apis/chromeuxreport_v1/classes.rb', line 56

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