eric6/DataViews/PyProfileDialog.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
equal deleted inserted replaced
8221:0572a215bd2f 8222:5994b80b8760
177 list(self.stats.items()), start=1 177 list(self.stats.items()), start=1
178 ): 178 ):
179 if self.cancelled: 179 if self.cancelled:
180 return 180 return
181 181
182 if (not (self.ericpath and 182 if (
183 not (self.ericpath and
183 func[0].startswith(self.ericpath)) and 184 func[0].startswith(self.ericpath)) and
184 not func[0].startswith("DebugClients") and 185 not func[0].startswith("DebugClients") and
185 func[0] != "profile" and 186 func[0] != "profile" and
186 not (exclude and (func[0].startswith(self.pyLibPath) or 187 not (exclude and (func[0].startswith(self.pyLibPath) or
187 func[0] == "") 188 func[0] == "")
188 )): 189 ) and
189 if (self.file is None or func[0].startswith(self.file) or 190 (self.file is None or
190 func[0].startswith(self.pyLibPath)): 191 func[0].startswith(self.file) or
191 # calculate the totals 192 func[0].startswith(self.pyLibPath))
192 total_calls += nc 193 ):
193 prim_calls += cc 194 # calculate the totals
194 total_tt += tt 195 total_calls += nc
195 196 prim_calls += cc
196 if nc != cc: 197 total_tt += tt
197 c = "{0:d}/{1:d}".format(nc, cc) 198
198 else: 199 if nc != cc:
199 c = str(nc) 200 c = "{0:d}/{1:d}".format(nc, cc)
200 if nc == 0: 201 else:
201 tpc = "{0: 8.3f}".format(0.0) 202 c = str(nc)
202 else: 203 if nc == 0:
203 tpc = "{0: 8.3f}".format(tt / nc) 204 tpc = "{0: 8.3f}".format(0.0)
204 if cc == 0: 205 else:
205 cpc = "{0: 8.3f}".format(0.0) 206 tpc = "{0: 8.3f}".format(tt / nc)
206 else: 207 if cc == 0:
207 cpc = "{0: 8.3f}".format(ct / cc) 208 cpc = "{0: 8.3f}".format(0.0)
208 self.__createResultItem(c, tt, tpc, ct, cpc, func[0], 209 else:
209 func[1], func[2]) 210 cpc = "{0: 8.3f}".format(ct / cc)
211 self.__createResultItem(c, tt, tpc, ct, cpc, func[0],
212 func[1], func[2])
210 213
211 self.checkProgress.setValue(progress) 214 self.checkProgress.setValue(progress)
212 QApplication.processEvents() 215 QApplication.processEvents()
213 finally: 216 finally:
214 # reenable updates of the list 217 # reenable updates of the list

eric ide

mercurial