##// END OF EJS Templates
code stats speed improvments
marcink -
r804:b92d9a03 beta
parent child Browse files
Show More
@@ -104,11 +104,9 b' def get_commits_stats(repo_name, ts_min_'
104 104 last_rev = last_rev + 1 if last_rev > 0 else last_rev
105 105 for rev in repo.revisions[last_rev:last_rev + parse_limit]:
106 106 last_cs = cs = repo.get_changeset(rev)
107 k = '%s-%s-%s' % (cs.date.timetuple()[0], cs.date.timetuple()[1],
108 cs.date.timetuple()[2])
109 timetupple = [int(x) for x in k.split('-')]
110 timetupple.extend([0 for _ in xrange(6)])
111 k = lmktime(timetupple)
107 k = lmktime([cs.date.timetuple()[0], cs.date.timetuple()[1],
108 cs.date.timetuple()[2], 0, 0, 0, 0, 0, 0])
109
112 110 if commits_by_day_author_aggregate.has_key(author_key_cleaner(cs.author)):
113 111 try:
114 112 l = [timegetter(x) for x in commits_by_day_author_aggregate\
@@ -158,10 +156,7 b' def get_commits_stats(repo_name, ts_min_'
158 156 else:
159 157 commits_by_day_aggregate[k] = 1
160 158
161 overview_data = []
162 for k, v in commits_by_day_aggregate.items():
163 overview_data.append([k, v])
164 overview_data = sorted(overview_data, key=itemgetter(0))
159 overview_data = sorted(commits_by_day_aggregate.items(), key=itemgetter(0))
165 160 if not commits_by_day_author_aggregate:
166 161 commits_by_day_author_aggregate[author_key_cleaner(repo.contact)] = {
167 162 "label":author_key_cleaner(repo.contact),
General Comments 0
You need to be logged in to leave comments. Login now