module Trino::Client::ModelVersions::V351::PipelineStats
Public Class Methods
decode(hash)
click to toggle source
# File lib/trino/client/model_versions/351.rb, line 1504 def decode(hash) unless hash.is_a?(Hash) raise TypeError, "Can't convert #{hash.class} to Hash" end obj = allocate obj.send(:initialize_struct, hash["pipelineId"], hash["firstStartTime"], hash["lastStartTime"], hash["lastEndTime"], hash["inputPipeline"], hash["outputPipeline"], hash["totalDrivers"], hash["queuedDrivers"], hash["queuedPartitionedDrivers"], hash["runningDrivers"], hash["runningPartitionedDrivers"], hash["blockedDrivers"], hash["completedDrivers"], hash["userMemoryReservation"], hash["revocableMemoryReservation"], hash["systemMemoryReservation"], hash["queuedTime"] && DistributionSnapshot.decode(hash["queuedTime"]), hash["elapsedTime"] && DistributionSnapshot.decode(hash["elapsedTime"]), hash["totalScheduledTime"], hash["totalCpuTime"], hash["totalBlockedTime"], hash["fullyBlocked"], hash["blockedReasons"] && hash["blockedReasons"].map {|h| h.downcase.to_sym }, hash["physicalInputDataSize"], hash["physicalInputPositions"], hash["physicalInputReadTime"], hash["internalNetworkInputDataSize"], hash["internalNetworkInputPositions"], hash["rawInputDataSize"], hash["rawInputPositions"], hash["processedInputDataSize"], hash["processedInputPositions"], hash["outputDataSize"], hash["outputPositions"], hash["physicalWrittenDataSize"], hash["operatorSummaries"] && hash["operatorSummaries"].map {|h| OperatorStats.decode(h) }, hash["drivers"] && hash["drivers"].map {|h| DriverStats.decode(h) }, ) obj end