Bugzilla – Attachment 66770 Details for
Bug 18055
Speed up '00-strict.t' test
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18055: Speed up '00-strict.t' test, with Parallel::ForkManager
Bug-18055-Speed-up-00-strictt-test-with-ParallelFo.patch (text/plain), 1.36 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-09-01 17:28:11 UTC
(
hide
)
Description:
Bug 18055: Speed up '00-strict.t' test, with Parallel::ForkManager
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-09-01 17:28:11 UTC
Size:
1.36 KB
patch
obsolete
>From c37e357455c04e885187b3b328efc9cc8f343534 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Fri, 16 Jun 2017 01:20:05 +1200 >Subject: [PATCH] Bug 18055: Speed up '00-strict.t' test, with > Parallel::ForkManager > >add KOHA_PROVE_CPUS envar to manually set number of cpus > >to test.. > >1/ set number of cpus to 1 > $ export KOHA_PROVE_CPUS=1 > >2/ observe 1 cpus are used > $ time prove -v t/db_dependent/00-strict.t > t/db_dependent/00-strict.t .. > Using 1 CPUs... > >3/ unset number of cpus > $ export KOHA_PROVE_CPUS= > >4/ observe all available cpus are used > $ time prove -v t/db_dependent/00-strict.t > t/db_dependent/00-strict.t .. > Using 32 CPUs... > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/00-strict.t | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/00-strict.t b/t/db_dependent/00-strict.t >index 4cdb877..b732b9f 100755 >--- a/t/db_dependent/00-strict.t >+++ b/t/db_dependent/00-strict.t >@@ -43,12 +43,14 @@ $Test::Strict::TEST_SKIP = [ > ]; > > my $ncpu; >-if ( $ENV{KOHA_JENKINS} ) { >- $ncpu = 2; # works fastest on kc.org jenkins box >+if ( $ENV{KOHA_PROVE_CPUS} ) { >+ $ncpu = $ENV{KOHA_PROVE_CPUS} ; # set number of cpus to use > } else { > $ncpu = Sys::CPU::cpu_count(); > } > >+print "Using $ncpu CPUs...\n"; >+ > my $pm = new Parallel::ForkManager($ncpu); > > foreach my $d (@dirs) { >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18055
:
59900
|
59901
|
59902
|
59966
|
63341
|
64322
|
66769
| 66770 |
66771
|
73403