Class: Rafflesia::DatasetBuildProfile

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/datasets/dataset_build_profile.rb

Constant Summary collapse

HASH_ATTRS =
{
  compaction_elapsed_ms: :compaction_elapsed_ms,
  completed_at: :completed_at,
  discovery_elapsed_ms: :discovery_elapsed_ms,
  export_elapsed_ms: :export_elapsed_ms,
  import_elapsed_ms: :import_elapsed_ms,
  manifest_elapsed_ms: :manifest_elapsed_ms,
  object_elapsed_ms: :object_elapsed_ms,
  started_at: :started_at,
  structure_timings: :structure_timings,
  table_timings: :table_timings,
  total_elapsed_ms: :total_elapsed_ms
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetBuildProfile

Returns a new instance of DatasetBuildProfile.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 35

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @compaction_elapsed_ms = hash[:compaction_elapsed_ms]
  @completed_at = hash[:completed_at]
  @discovery_elapsed_ms = hash[:discovery_elapsed_ms]
  @export_elapsed_ms = hash[:export_elapsed_ms]
  @import_elapsed_ms = hash[:import_elapsed_ms]
  @manifest_elapsed_ms = hash[:manifest_elapsed_ms]
  @object_elapsed_ms = hash[:object_elapsed_ms]
  @started_at = hash[:started_at]
  @structure_timings = (hash[:structure_timings] || []).map { |item| item ? Rafflesia::DatasetBuildStructureTiming.new(item) : nil }
  @table_timings = (hash[:table_timings] || []).map { |item| item ? Rafflesia::DatasetBuildTableTiming.new(item) : nil }
  @total_elapsed_ms = hash[:total_elapsed_ms]
end

Instance Attribute Details

#compaction_elapsed_msObject

Returns the value of attribute compaction_elapsed_ms.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def compaction_elapsed_ms
  @compaction_elapsed_ms
end

#completed_atObject

Returns the value of attribute completed_at.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def completed_at
  @completed_at
end

#discovery_elapsed_msObject

Returns the value of attribute discovery_elapsed_ms.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def discovery_elapsed_ms
  @discovery_elapsed_ms
end

#export_elapsed_msObject

Returns the value of attribute export_elapsed_ms.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def export_elapsed_ms
  @export_elapsed_ms
end

#import_elapsed_msObject

Returns the value of attribute import_elapsed_ms.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def import_elapsed_ms
  @import_elapsed_ms
end

#manifest_elapsed_msObject

Returns the value of attribute manifest_elapsed_ms.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def manifest_elapsed_ms
  @manifest_elapsed_ms
end

#object_elapsed_msObject

Returns the value of attribute object_elapsed_ms.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def object_elapsed_ms
  @object_elapsed_ms
end

#started_atObject

Returns the value of attribute started_at.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def started_at
  @started_at
end

#structure_timingsObject

Returns the value of attribute structure_timings.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def structure_timings
  @structure_timings
end

#table_timingsObject

Returns the value of attribute table_timings.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def table_timings
  @table_timings
end

#total_elapsed_msObject

Returns the value of attribute total_elapsed_ms.



22
23
24
# File 'lib/rafflesia/datasets/dataset_build_profile.rb', line 22

def total_elapsed_ms
  @total_elapsed_ms
end