DataViews/CodeMetrics.py

changeset 5587
ea526b78ee6c
parent 5389
9b1c800daff3
child 5597
3d88d53f8c2b
equal deleted inserted replaced
5586:0e5421d679e7 5587:ea526b78ee6c
172 """ 172 """
173 for id, level, row in self.active: 173 for id, level, row in self.active:
174 counters = self.counters.setdefault(id, {}) 174 counters = self.counters.setdefault(id, {})
175 counters[key] = counters.setdefault(key, 0) + value 175 counters[key] = counters.setdefault(key, 0) + value
176 176
177 def getCounter(self, id, key): 177 def getCounter(self, counterId, key):
178 """ 178 """
179 Public method used to get a specific counter value. 179 Public method used to get a specific counter value.
180 180
181 @param id id of the counter (string) 181 @param counterId id of the counter (string)
182 @param key key of the value to be retrieved (string) 182 @param key key of the value to be retrieved (string)
183 @return the value of the requested counter (int) 183 @return the value of the requested counter (int)
184 """ 184 """
185 return self.counters.get(id, {}).get(key, 0) 185 return self.counters.get(counterId, {}).get(key, 0)
186 186
187 187
188 def summarize(total, key, value): 188 def summarize(total, key, value):
189 """ 189 """
190 Module function used to collect overall statistics. 190 Module function used to collect overall statistics.

eric ide

mercurial