TaskPipe/ThreadManager/Settings.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« TaskPipe/Template_Task_ScrapeStub.pm ↑ Summary TaskPipe/TorManager/Settings.pm »
1 package TaskPipe::ThreadManager::Settings;
2  
3 38 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 38 with 'MooseX::ConfigCascade';
5  
6  
7 =head1 NAME
8  
9 TaskPipe::ThreadManager::Settings - Settings for L<TaskPipe::ThreadManager>
10  
11 =head1 METHODS
12  
13 =over
14  
15 =item max_threads
16  
17 The maximum number of threads to use when running a plan. Taskpipe tries to adhere strictly to the number of threads you specify here - so parent threads are included in the value. You should experiment with your setup to determine the optimum value for your system
18  
19 =cut
20  
21 38 has max_threads => (is => 'ro', isa => 'Int', default => 80);
22  
23  
24  
25 =item refresh_mins
26  
27 The number of minutes after which a thread should be refreshed. Refreshing a thread has the same effect as stopping the thread and running it again - it resumes where it left off, but obviously there is a performance penalty. The point of doing this is to mitigate memory leaks which occur in long running code. The less leaky the code, the longer C<refresh_mins> can be. (However, even L<LWP::UserAgent> and L<Web::Scraper> both appear to leak slightly in long runs, so it is probably better to accept leaks as a fact of life and compensate for them rather than spending hours trying to eliminate them entirely.)
28  
29 =cut
30  
31 38 has refresh_mins => (is => 'ro', isa => 'Int', default => 20);
32  
33  
34  
35 =item thread_table_deadlock_retries
36  
37 The number of times to retry an update to the thread table in the event of a "serialization failure" (deadlock)
38  
39 =cut
40  
41 38 has thread_table_deadlock_retries => (is => 'ro', isa => 'Int', default => 4 );
42  
43  
44  
45 =head1 AUTHOR
46  
47 Tom Gracey <tomgracey@gmail.com>
48  
49 =head1 COPYRIGHT AND LICENSE
50  
51 Copyright (c) Tom Gracey 2018
52  
53 TaskPipe is free software, licensed under
54  
55 The GNU Public License Version 3
56  
57 =cut
58  
59  
60 38 __PACKAGE__->meta->make_immutable;
61 38 1;
62  
« TaskPipe/Template_Task_ScrapeStub.pm ↑ Summary TaskPipe/TorManager/Settings.pm »