Example #1
0
def index():

    all_counters = sorted(list(counter.keys()))
    all_records = sorted(list(record.keys()))

    return render_template("index.html",
        counters=all_counters,
        records=all_records,
    )
Example #2
0
    return r

base.now = now

print "Creating dummy data points."

start = time()
stat_names = ['registrations', 'posts', 'page loads', 'updates', 'something else']
for i in xrange(10000):
    n = choice(stat_names)
    counter.incr(n)

for i in range(10000):
    record.add("Processing Time", randint(0, 5))


print "Reloaded in %f secconds....\n" % (time() - start)
print


print "KEYS :", counter.keys()
for k in counter.keys():
    print "VALS :", len(counter.values(k))


print "\n\nStarting flask web UI....\n\n"


if __name__ == "__main__":
    app.run(host="0.0.0.0", use_reloader=False)