From c1ce372185dbbbd4b2e61979f45757e4954ee98a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 24 Jan 2014 12:50:49 +0000 Subject: buildrepo: print spent time per repo --- buildrepo.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildrepo.lua b/buildrepo.lua index 898d1e6..bfffcab 100755 --- a/buildrepo.lua +++ b/buildrepo.lua @@ -150,6 +150,7 @@ for _,repo in pairs(args) do local unsorted = {} local logdir = nil stats[repo] = {} + local start_time = os.clock() -- count total aports stats[repo].aports = 0 @@ -222,11 +223,14 @@ for _,repo in pairs(args) do stats[repo].built = built stats[repo].tried = tried stats[repo].deleted = deleted + stats[repo].time = os.clock() - start_time end for repo,stat in pairs(stats) do - print(repo.." aports:", stat.aports) print(repo.." built:", stat.built) print(repo.." tried:", stat.tried) print(repo.." deleted:", stat.deleted) + print(repo.." time:", stat.time) + print(repo.." total built:", stat.aports - stat.tried + stat.built) + print(repo.." total aports:", stat.aports) end -- cgit v1.2.3