|
@@ -20,14 +20,22 @@ def create_sample_time_series(event):
|
|
|
|
|
|
for _ in xrange(60):
|
|
|
count = randint(1, 10)
|
|
|
- tsdb.incr(tsdb.models.project, group.project.id, now, count)
|
|
|
- tsdb.incr(tsdb.models.group, group.id, now, count)
|
|
|
+ tsdb.incr_multi((
|
|
|
+ (tsdb.models.project_total_received, group.project.id),
|
|
|
+ (tsdb.models.project_total_rejected, group.project.id),
|
|
|
+ (tsdb.models.project, group.project.id),
|
|
|
+ (tsdb.models.group, group.id),
|
|
|
+ ), now, count)
|
|
|
now = now - timedelta(seconds=1)
|
|
|
|
|
|
for _ in xrange(24 * 30):
|
|
|
count = randint(100, 1000)
|
|
|
- tsdb.incr(tsdb.models.project, group.project.id, now, count)
|
|
|
- tsdb.incr(tsdb.models.group, group.id, now, count)
|
|
|
+ tsdb.incr_multi((
|
|
|
+ (tsdb.models.project_total_received, group.project.id),
|
|
|
+ (tsdb.models.project_total_rejected, group.project.id),
|
|
|
+ (tsdb.models.project, group.project.id),
|
|
|
+ (tsdb.models.group, group.id),
|
|
|
+ ), now, count)
|
|
|
now = now - timedelta(hours=1)
|
|
|
|
|
|
|