Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: infra/tools/antibody/antibody.py

Issue 1235373004: Added script to generate stats on a git checkout (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@new_antibody_db_schema
Patch Set: Fixed nits and changed output for antibody stats Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: infra/tools/antibody/antibody.py
diff --git a/infra/tools/antibody/antibody.py b/infra/tools/antibody/antibody.py
index 5c8c0037e3de5ddb2af1d6e681aa14eff294e2a0..8a90bcea199cf9512818ba3f51413d56d1ab5e63 100644
--- a/infra/tools/antibody/antibody.py
+++ b/infra/tools/antibody/antibody.py
@@ -11,6 +11,7 @@ import os
import shutil
import infra.tools.antibody.cloudsql_connect as csql
+from infra.tools.antibody import compute_stats
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
ANTIBODY_UI_MAIN_NAME = 'index.html'
@@ -107,4 +108,13 @@ def get_gitiles_prefix(git_checkout_path):
return line[len('VIEW_VC:'):].strip()
# TODO (ksho): implement more sophisticated solution if codereview.settings
# does not contain VIEW_VC
- return None
+ return None
+
+
+def generate_stats_files(cc, output_dirpath):
+ compute_stats.all_time_leaderboard(cc,
+ os.path.join(output_dirpath, 'all_time_leaderboard'))
+ compute_stats.past_month_leaderboard(cc,
+ os.path.join(output_dirpath, 'past_month_leaderboard'))
+ compute_stats.all_monthly_stats(cc,
+ os.path.join(output_dirpath, 'all_monthly_stats'))

Powered by Google App Engine
This is Rietveld 408576698