Lines Matching refs:stat
55 self.stat = int(row[0])
64 raise 'stat db error'
65 self.stat = int(row[0])
72 return '''Data(['%d', '%d', '%d', '%d', '%f'])''' % ( self.stat,
77 self.stat = int(row[0])
100 self.formula = self.db.allFormulas[self.stat]
152 def get(self, job, stat, system=None):
162 stat.system = self[system]
164 if scalar(stat):
165 return value(stat, run.run)
166 if vector(stat):
167 return values(stat, run.run)
179 def append(self, stat):
180 statname = re.sub(':', '__', stat.name)
194 x.__dict__[name] = stat
197 self.statdict[statname] = stat
221 if self.allSubData.has_key(subdata.stat):
222 self.allSubData[subdata.stat].append(subdata)
224 self.allSubData[subdata.stat] = [ subdata ]
234 stat = info.NewStat(self, StatData(result))
235 self.append(stat)
236 self.allStats.append(stat)
237 self.allStatIds[stat.stat] = stat
238 self.allStatNames[stat.name] = stat
294 print '%-60s %-8s %-10s' % ('stat name', 'id', 'type')
301 stats = [ stat.name for stat in self.allStats ]
303 for stat in stats:
304 stat = self.allStatNames[stat]
305 if rx == None or rx.match(stat.name):
306 print '%-60s %-8s %-10s' % (stat.name, stat.stat, stat.type)
320 stats = [ stat.name for stat in self.allStats ]
322 for stat in stats:
323 stat = self.allStatNames[stat]
324 if stat.type == 'FORMULA' and (rx == None or rx.match(stat.name)):
325 print '%-60s %s' % (stat.name, self.allFormulas[stat.stat])
332 for stat in stats:
333 if type(stat) is int:
334 ret.append(self.allStatIds[stat])
336 if type(stat) is str:
337 rx = re.compile(stat)
338 for stat in self.allStats:
339 if rx.match(stat.name):
340 ret.append(stat)
346 def query(self, op, stat, ticks, group=False):
348 sql += 'dt_stat as stat, '
358 if isinstance(stat, list):
359 val = ' or '.join([ 'dt_stat=%d' % s.stat for s in stat ])
362 sql += ' dt_stat=%d' % stat.stat
378 # Desc: given a run, a stat and an array of samples, total the samples
383 # Desc: given a run, a stat and an array of samples, average the samples
384 def avg(self, stat, ticks):
388 # Desc: given a run, a stat and an array of samples, get the standard
390 def stdev(self, stat, ticks):
407 def data(self, stat, ticks=None):
410 sql = self._method(self, stat, ticks)