HamidOmarov commited on
Commit
f8f9335
·
1 Parent(s): 089198a

Add in-memory metrics: avg_ms, last7, lastN, /stats + /get_history

Browse files
Files changed (1) hide show
  1. app/metrics.py +1 -1
app/metrics.py CHANGED
@@ -30,7 +30,7 @@ class StatsTracker:
30
  last7 = []
31
  for i in range(6, -1, -1):
32
  d = today - timedelta(days=i)
33
- last7.append({ "date": d.isoformat(), "questions": int(self._by_day.get(d, 0)) })
34
  return {
35
  "total_chunks": int(self.total_chunks),
36
  "questions_answered": int(self.questions_answered),
 
30
  last7 = []
31
  for i in range(6, -1, -1):
32
  d = today - timedelta(days=i)
33
+ last7.append({"date": d.isoformat(), "questions": int(self._by_day.get(d, 0))})
34
  return {
35
  "total_chunks": int(self.total_chunks),
36
  "questions_answered": int(self.questions_answered),