MCPcopy Index your code
hub / github.com/dbcli/pgcli / calculate_maximums

Method calculate_maximums

pgcli/pyev.py:137–156  ·  view source on GitHub ↗
(self, plan)

Source from the content-addressed store, hash-verified

135 return plan
136
137 def calculate_maximums(self, plan):
138 if not self.explain.get("Max Rows"):
139 self.explain["Max Rows"] = plan["Actual Rows"]
140 elif self.explain.get("Max Rows") < plan["Actual Rows"]:
141 self.explain["Max Rows"] = plan["Actual Rows"]
142
143 if not self.explain.get("Max Cost"):
144 self.explain["Max Cost"] = plan["Actual Cost"]
145 elif self.explain.get("Max Cost") < plan["Actual Cost"]:
146 self.explain["Max Cost"] = plan["Actual Cost"]
147
148 if not self.explain.get("Max Duration"):
149 self.explain["Max Duration"] = plan["Actual Duration"]
150 elif self.explain.get("Max Duration") < plan["Actual Duration"]:
151 self.explain["Max Duration"] = plan["Actual Duration"]
152
153 if not self.explain.get("Total Cost"):
154 self.explain["Total Cost"] = plan["Actual Cost"]
155 elif self.explain.get("Total Cost") < plan["Actual Cost"]:
156 self.explain["Total Cost"] = plan["Actual Cost"]
157
158 #
159 def duration_to_string(self, value):

Callers 1

process_planMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected