From 3e4fcb3d198d378ad0a1c0c02cfcdb6e8feff08c Mon Sep 17 00:00:00 2001 From: bsimpson63 Date: Wed, 30 Jan 2013 15:23:48 -0500 Subject: [PATCH] Delete benchmark_promoted. --- r2/r2/lib/promote.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/r2/r2/lib/promote.py b/r2/r2/lib/promote.py index 1b2766a9e..851d5bbf0 100644 --- a/r2/r2/lib/promote.py +++ b/r2/r2/lib/promote.py @@ -890,22 +890,6 @@ def insert_promoted(link_names, promoted_every_n=6): return link_names, campaigns_by_link -def benchmark_promoted(user, site, link_sample=50, attempts=100): - c.user = user - c.site = site - link_names = ["blah%s" % i for i in xrange(link_sample)] - res = {} - for i in xrange(attempts): - names, campaigns_by_link = insert_promoted(link_names[::]) - name = names[0] - res[name] = res.get(name, 0) + 1 - res = list(res.iteritems()) - res.sort(key=lambda x: x[1], reverse=True) - expected = dict(get_promotion_list(user, site)) - for l, v in res: - print "%s: %5.3f %3.5f" % (l, float(v) / attempts, expected.get(l, 0)) - - def get_total_run(link): """Return the total time span this promotion has run for.