Class: Google::Apis::DataflowV1b3::CpuTime

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

Overview

Modeled after information exposed by /proc/stat.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CpuTime

Returns a new instance of CpuTime.



417
418
419
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 417

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

Instance Attribute Details

#rateFloat

Average CPU utilization rate (% non-idle cpu / second) since previous sample. Corresponds to the JSON property rate

Returns:

  • (Float)


404
405
406
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 404

def rate
  @rate
end

#timestampString

Timestamp of the measurement. Corresponds to the JSON property timestamp

Returns:

  • (String)


409
410
411
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 409

def timestamp
  @timestamp
end

#total_msFixnum

Total active CPU time across all cores (ie., non-idle) in milliseconds since start-up. Corresponds to the JSON property totalMs

Returns:

  • (Fixnum)


415
416
417
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 415

def total_ms
  @total_ms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



422
423
424
425
426
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 422

def update!(**args)
  @rate = args[:rate] if args.key?(:rate)
  @timestamp = args[:timestamp] if args.key?(:timestamp)
  @total_ms = args[:total_ms] if args.key?(:total_ms)
end