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))))
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))))
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)))
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)))