Make number of processes configurable.
Default to 8.
This commit is contained in:
parent
8647c75d48
commit
c447e55a7a
@ -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.
|
||||||
|
5
gitstats
5
gitstats
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user