Class: Presto::Client::StatementStats
- Inherits:
-
Object
- Object
- Presto::Client::StatementStats
- Defined in:
- lib/presto/client/models.rb
Overview
class StageStats
attr_reader :stage_id
attr_reader :state
attr_reader :done
attr_reader :nodes
attr_reader :total_splits
attr_reader :queued_splits
attr_reader :running_splits
attr_reader :completed_splits
attr_reader :user_time_millis
attr_reader :cpu_time_millis
attr_reader :wall_time_millis
attr_reader :processed_rows
attr_reader :processed_bytes
attr_reader :sub_stages
def initialize(={})
@stage_id = [:stage_id]
@state = [:state]
@done = [:done]
@nodes = [:nodes]
@total_splits = [:total_splits]
@queued_splits = [:queued_splits]
@running_splits = [:running_splits]
@completed_splits = [:completed_splits]
@user_time_millis = [:user_time_millis]
@cpu_time_millis = [:cpu_time_millis]
@wall_time_millis = [:wall_time_millis]
@processed_rows = [:processed_rows]
@processed_bytes = [:processed_bytes]
@sub_stages = [:sub_stages]
end
def self.decode_hash(hash)
new(
stage_id: hash["stageId"],
state: hash["state"],
done: hash["done"],
nodes: hash["nodes"],
total_splits: hash["totalSplits"],
queued_splits: hash["queuedSplits"],
running_splits: hash["runningSplits"],
completed_splits: hash["completedSplits"],
user_time_millis: hash["userTimeMillis"],
cpu_time_millis: hash["cpuTimeMillis"],
wall_time_millis: hash["wallTimeMillis"],
processed_rows: hash["processedRows"],
processed_bytes: hash["processedBytes"],
sub_stages: hash["subStages"].map {|h| StageStats.decode_hash(h) },
)
end
end
Instance Attribute Summary collapse
-
#completed_splits ⇒ Object
readonly
Returns the value of attribute completed_splits.
-
#cpu_time_millis ⇒ Object
readonly
Returns the value of attribute cpu_time_millis.
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
-
#processed_bytes ⇒ Object
readonly
Returns the value of attribute processed_bytes.
-
#processed_rows ⇒ Object
readonly
Returns the value of attribute processed_rows.
-
#queued_splits ⇒ Object
readonly
Returns the value of attribute queued_splits.
-
#running_splits ⇒ Object
readonly
Returns the value of attribute running_splits.
-
#scheduled ⇒ Object
readonly
Returns the value of attribute scheduled.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#total_splits ⇒ Object
readonly
Returns the value of attribute total_splits.
-
#user_time_millis ⇒ Object
readonly
Returns the value of attribute user_time_millis.
-
#wall_time_millis ⇒ Object
readonly
Returns the value of attribute wall_time_millis.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ StatementStats
constructor
attr_reader :root_stage.
Constructor Details
#initialize(options = {}) ⇒ StatementStats
attr_reader :root_stage
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/presto/client/models.rb', line 124 def initialize(={}) @state = state @scheduled = scheduled @nodes = nodes @total_splits = total_splits @queued_splits = queued_splits @running_splits = running_splits @completed_splits = completed_splits @user_time_millis = user_time_millis @cpu_time_millis = cpu_time_millis @wall_time_millis = wall_time_millis @processed_rows = processed_rows @processed_bytes = processed_bytes #@root_stage = root_stage end |
Instance Attribute Details
#completed_splits ⇒ Object (readonly)
Returns the value of attribute completed_splits.
116 117 118 |
# File 'lib/presto/client/models.rb', line 116 def completed_splits @completed_splits end |
#cpu_time_millis ⇒ Object (readonly)
Returns the value of attribute cpu_time_millis.
118 119 120 |
# File 'lib/presto/client/models.rb', line 118 def cpu_time_millis @cpu_time_millis end |
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
112 113 114 |
# File 'lib/presto/client/models.rb', line 112 def nodes @nodes end |
#processed_bytes ⇒ Object (readonly)
Returns the value of attribute processed_bytes.
121 122 123 |
# File 'lib/presto/client/models.rb', line 121 def processed_bytes @processed_bytes end |
#processed_rows ⇒ Object (readonly)
Returns the value of attribute processed_rows.
120 121 122 |
# File 'lib/presto/client/models.rb', line 120 def processed_rows @processed_rows end |
#queued_splits ⇒ Object (readonly)
Returns the value of attribute queued_splits.
114 115 116 |
# File 'lib/presto/client/models.rb', line 114 def queued_splits @queued_splits end |
#running_splits ⇒ Object (readonly)
Returns the value of attribute running_splits.
115 116 117 |
# File 'lib/presto/client/models.rb', line 115 def running_splits @running_splits end |
#scheduled ⇒ Object (readonly)
Returns the value of attribute scheduled.
111 112 113 |
# File 'lib/presto/client/models.rb', line 111 def scheduled @scheduled end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
110 111 112 |
# File 'lib/presto/client/models.rb', line 110 def state @state end |
#total_splits ⇒ Object (readonly)
Returns the value of attribute total_splits.
113 114 115 |
# File 'lib/presto/client/models.rb', line 113 def total_splits @total_splits end |
#user_time_millis ⇒ Object (readonly)
Returns the value of attribute user_time_millis.
117 118 119 |
# File 'lib/presto/client/models.rb', line 117 def user_time_millis @user_time_millis end |
#wall_time_millis ⇒ Object (readonly)
Returns the value of attribute wall_time_millis.
119 120 121 |
# File 'lib/presto/client/models.rb', line 119 def wall_time_millis @wall_time_millis end |
Class Method Details
.decode_hash(hash) ⇒ Object
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/presto/client/models.rb', line 140 def self.decode_hash(hash) new( state: hash["state"], scheduled: hash["scheduled"], nodes: hash["nodes"], total_splits: hash["totalSplits"], queued_splits: hash["queuedSplits"], running_splits: hash["runningSplits"], completed_splits: hash["completedSplits"], user_time_millis: hash["userTimeMillis"], cpu_time_millis: hash["cpuTimeMillis"], wall_time_millis: hash["wallTimeMillis"], processed_rows: hash["processedRows"], processed_bytes: hash["processedBytes"], #root_stage: StageStats.decode_hash(hash["rootStage"]), ) end |