Example #1
0
def hyperion_event_aggregate_retrieval(application, event):
  now = int(time()) * 1000
  events = []
  accounts = db.hkeys('al:%s' % application)
  for account in accounts:
    events.extend(db.zrangebyscore('ed:%s:%s:%s' % (application,account,event), now - MILLISECONDS_PER_DAY, now))
  return jsonify(datapoints=Aggregator.rollup(now, sorted(imap(int, events))))
Example #2
0
def hyperion_event_aggregate_retrieval(application, event):
    now = int(time()) * 1000
    events = []
    accounts = db.hkeys('al:%s' % application)
    for account in accounts:
        events.extend(
            db.zrangebyscore('ed:%s:%s:%s' % (application, account, event),
                             now - MILLISECONDS_PER_DAY, now))
    return jsonify(
        datapoints=Aggregator.rollup(now, sorted(imap(int, events))))
Example #3
0
def hyperion_event_retrieval(application, account, event):
  now = int(time()) * 1000
  events = db.zrangebyscore('ed:%s:%s:%s' % (application,account,event), now - MILLISECONDS_PER_DAY, now)
  return jsonify(datapoints=Aggregator.rollup(now, imap(int, events)))
Example #4
0
def hyperion_event_retrieval(application, account, event):
    now = int(time()) * 1000
    events = db.zrangebyscore('ed:%s:%s:%s' % (application, account, event),
                              now - MILLISECONDS_PER_DAY, now)
    return jsonify(datapoints=Aggregator.rollup(now, imap(int, events)))