Make number of processes configurable.

Default to 8.
This commit is contained in:
Heikki Hokkanen 2013-07-29 17:42:36 +03:00
parent 8647c75d48
commit c447e55a7a
2 changed files with 7 additions and 2 deletions

View File

@ -53,6 +53,10 @@ How many domains to show in domains by commits.
Maximum file extension length. Maximum file extension length.
=item processes
Number of concurrent processes to use when extracting git repository data.
=item project_name =item project_name
Project name to show on the generated pages. Default is to use basename of the repository directory. Project name to show on the generated pages. Default is to use basename of the repository directory.

View File

@ -46,7 +46,8 @@ conf = {
'commit_end': 'HEAD', 'commit_end': 'HEAD',
'linear_linestats': 1, 'linear_linestats': 1,
'project_name': '', 'project_name': '',
'merge_authors': {} 'merge_authors': {},
'processes': 8,
} }
def getpipeoutput(cmds, quiet = False): def getpipeoutput(cmds, quiet = False):
@ -448,7 +449,7 @@ class GitDataCollector(DataCollector):
revs_to_read.append((time,rev)) revs_to_read.append((time,rev))
#Read revisions from repo #Read revisions from repo
time_rev_count = Pool(processes=24).map(getnumoffilesfromrev, revs_to_read) time_rev_count = Pool(processes=conf['processes']).map(getnumoffilesfromrev, revs_to_read)
#Update cache with new revisions and append then to general list #Update cache with new revisions and append then to general list
for (time, rev, count) in time_rev_count: for (time, rev, count) in time_rev_count: