From b8d6ad2136ac18b89a9c97e9ecdfd4c95151aae6 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Fri, 14 Dec 2012 16:52:15 +0000 Subject: Print ccache statistics --- (limited to 'devbot/build.py') diff --git a/devbot/build.py b/devbot/build.py index cc41857..ee15192 100644 --- a/devbot/build.py +++ b/devbot/build.py @@ -40,6 +40,8 @@ def pull(): def build(): environ.setup() + _ccache_reset() + modules = config.load_modules() skipped = [] @@ -66,6 +68,8 @@ def build(): if not _build_module(module, config.get_log_path("build")): return False + _ccache_print_stats() + return True def clean(): @@ -78,6 +82,13 @@ def clean(): if module.get_git_module().clean(): print "Cleaned %s git repository." % module.name +def _ccache_reset(): + subprocess.check_call(["ccache", "-z"], stdout=utils.devnull) + +def _ccache_print_stats(): + print "\n=== ccache statistics ===\n" + subprocess.check_call(["ccache", "-s"]) + def _unlink_libtool_files(): def func(arg, dirname, fnames): for fname in fnmatch.filter(fnames, "*.la"): -- cgit v0.9.1