analytics: Replace CountStat.is_gauge with interval.

Groundwork for allowing stats like "Monthly Active Users".

CountStat.interval is no longer as clean a value as before, so removed it
from views.get_chart_data. It wasn't being used by the frontend anyway.

Removing interval from logger calls in counts.py is not a big loss since we
now include the frequency (which is typically also the interval) in
CountStat.property.
This commit is contained in:
Rishi Gupta
2017-03-15 21:08:36 -07:00
committed by Tim Abbott
parent d6c5c672d3
commit 9b661ca91f
7 changed files with 32 additions and 46 deletions

View File

@@ -44,7 +44,7 @@ class Command(BaseCommand):
days=self.DAYS_OF_DATA, business_hours_base=business_hours_base,
non_business_hours_base=non_business_hours_base, growth=growth,
autocorrelation=autocorrelation, spikiness=spikiness, holiday_rate=holiday_rate,
frequency=stat.frequency, is_gauge=(stat.interval == CountStat.GAUGE),
frequency=stat.frequency, partial_sum=(stat.interval > timedelta(days=1000)),
random_seed=self.random_seed)
def handle(self, *args, **options):