From c827dea143f74a6dcc0bfd070427164d203d2ce0 Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Wed, 13 Nov 2013 21:39:16 -0500 Subject: [PATCH] Add timer around normalized_hot. --- r2/r2/lib/normalized_hot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/normalized_hot.py b/r2/r2/lib/normalized_hot.py index ca1c85f15..2631e2c12 100644 --- a/r2/r2/lib/normalized_hot.py +++ b/r2/r2/lib/normalized_hot.py @@ -38,5 +38,9 @@ def l(li): return list(li) def normalized_hot(sr_ids, obey_age_limit=True): + timer = g.stats.get_timer("normalized_hot") + timer.start() sr_ids = l(sorted(sr_ids)) - return normalized_hot_cached(sr_ids, obey_age_limit) if sr_ids else () + ret = normalized_hot_cached(sr_ids, obey_age_limit) if sr_ids else () + timer.stop() + return ret