Skip to content

Commit fea3abc

Browse files
committed
Issue #4833: install Devel::NYTProf in Docker image
a modest number of dependencies are installed as well
1 parent 3728e9c commit fea3abc

4 files changed

Lines changed: 187 additions & 3 deletions

File tree

bin/otobo.CheckModules.pl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ =head1 DESCRIPTION
191191
'db:sqlite' => 1,
192192
'devel:encoding' => 1,
193193
'devel:test' => 1,
194+
'devel:profiling' => 1,
194195
'gazelle' => 1,
195196
'performance:redis' => 1,
196197
'storage:s3' => 1,
@@ -209,6 +210,7 @@ =head1 DESCRIPTION
209210
'db:sqlite' => 'Support for database SQLLite',
210211
'devel:encoding' => 'Modules for debugging encoding issues',
211212
'devel:test' => 'Modules for running the test suite',
213+
'devel:profiling' => 'Modules for profiline Perl code',
212214
'div' => 'Various features for additional functionality',
213215
'gazelle' => 'Required packages if you want to use Gazelle webserver',
214216
'mail' => 'Features enabling communication with a mail-server',
@@ -1113,6 +1115,22 @@ =head1 DESCRIPTION
11131115
ports => undef,
11141116
},
11151117
},
1118+
1119+
# Feature devel:profiling
1120+
{
1121+
Module => 'Devel::NYTProf',
1122+
VersionRequired => '>= 6.12', # released in 2022, with significant changes
1123+
Features => ['devel:profiling'],
1124+
Comment => 'for profiling Perl code',
1125+
InstTypes => {},
1126+
},
1127+
{
1128+
Module => 'Plack::Middleware::Profiler::NYTProf',
1129+
VersionRequired => '>= 0.17', # latest released version from 2014
1130+
Features => ['devel:profiling'],
1131+
Comment => 'plack middleware for profiling a plack app like otobo.psgi',
1132+
InstTypes => {},
1133+
},
11161134
);
11171135

11181136
# Sanity check.

cpanfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@ feature 'devel:encoding', 'Modules for debugging encoding issues' => sub {
147147

148148
};
149149

150+
feature 'devel:profiling', 'Modules for profiline Perl code' => sub {
151+
# for profiling Perl code
152+
requires 'Devel::NYTProf', '>= 6.12';
153+
154+
# plack middleware for profiling a plack app like otobo.psgi
155+
requires 'Plack::Middleware::Profiler::NYTProf', '>= 0.17';
156+
157+
};
158+
150159
feature 'devel:test', 'Modules for running the test suite' => sub {
151160
# for deeply inspecting scalars, especially strings
152161
requires 'Data::Peek';
@@ -341,6 +350,12 @@ feature 'optional', 'Support for feature optional' => sub {
341350
# bring explain() back to test scripts
342351
requires 'Test2::Tools::Explain';
343352

353+
# for profiling Perl code
354+
requires 'Devel::NYTProf', '>= 6.12';
355+
356+
# plack middleware for profiling a plack app like otobo.psgi
357+
requires 'Plack::Middleware::Profiler::NYTProf', '>= 0.17';
358+
344359
};
345360

346361
feature 'performance:csv', 'Support for feature performance:csv' => sub {

cpanfile.docker

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ requires 'Const::Fast';
141141

142142
# };
143143

144+
# feature 'devel:profiling', 'Modules for profiline Perl code' => sub {
145+
# for profiling Perl code
146+
requires 'Devel::NYTProf', '>= 6.12';
147+
148+
# plack middleware for profiling a plack app like otobo.psgi
149+
requires 'Plack::Middleware::Profiler::NYTProf', '>= 0.17';
150+
151+
# };
152+
144153
# feature 'devel:test', 'Modules for running the test suite' => sub {
145154
# for deeply inspecting scalars, especially strings
146155
requires 'Data::Peek';

cpanfile.docker.snapshot

Lines changed: 145 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,29 @@ DISTRIBUTIONS
12241224
File::Spec 0
12251225
File::Temp 0.16
12261226
perl 5.004050
1227+
Devel-NYTProf-6.14
1228+
pathname: J/JK/JKEENAN/Devel-NYTProf-6.14.tar.gz
1229+
provides:
1230+
Devel::NYTProf 6.14
1231+
Devel::NYTProf::Apache 6.14
1232+
Devel::NYTProf::Constants undef
1233+
Devel::NYTProf::Core 6.14
1234+
Devel::NYTProf::Data 6.14
1235+
Devel::NYTProf::FileHandle undef
1236+
Devel::NYTProf::FileInfo undef
1237+
Devel::NYTProf::ReadStream 6.14
1238+
Devel::NYTProf::Reader 6.14
1239+
Devel::NYTProf::Run undef
1240+
Devel::NYTProf::SubCallInfo undef
1241+
Devel::NYTProf::SubInfo undef
1242+
Devel::NYTProf::Util 6.14
1243+
requirements:
1244+
ExtUtils::MakeMaker 0
1245+
File::Which 1.09
1246+
Getopt::Long 0
1247+
JSON::MaybeXS 0
1248+
List::Util 0
1249+
XSLoader 0
12271250
Devel-StackTrace-2.05
12281251
pathname: D/DR/DROLSKY/Devel-StackTrace-2.05.tar.gz
12291252
provides:
@@ -1377,6 +1400,22 @@ DISTRIBUTIONS
13771400
ExtUtils::MakeMaker 0
13781401
HTTP::Date 0
13791402
perl 5.006
1403+
File-Remove-1.61
1404+
pathname: S/SH/SHLOMIF/File-Remove-1.61.tar.gz
1405+
provides:
1406+
File::Remove 1.61
1407+
requirements:
1408+
Cwd 3.29
1409+
ExtUtils::MakeMaker 0
1410+
File::Glob 0
1411+
File::Path 0
1412+
File::Spec 3.29
1413+
Module::Build 0.28
1414+
constant 0
1415+
perl 5.008
1416+
strict 0
1417+
vars 0
1418+
warnings 0
13801419
File-ShareDir-1.118
13811420
pathname: R/RE/REHSACK/File-ShareDir-1.118.tar.gz
13821421
provides:
@@ -1938,13 +1977,88 @@ DISTRIBUTIONS
19381977
Try::Tiny 0
19391978
strict 0
19401979
warnings 0
1980+
Module-Install-1.21
1981+
pathname: E/ET/ETHER/Module-Install-1.21.tar.gz
1982+
provides:
1983+
Module::AutoInstall 1.21
1984+
Module::Install 1.21
1985+
Module::Install::Admin 1.21
1986+
Module::Install::Admin::Bundle 1.21
1987+
Module::Install::Admin::Compiler 1.21
1988+
Module::Install::Admin::Find 1.21
1989+
Module::Install::Admin::Include 1.21
1990+
Module::Install::Admin::Makefile 1.21
1991+
Module::Install::Admin::Manifest 1.21
1992+
Module::Install::Admin::Metadata 1.21
1993+
Module::Install::Admin::ScanDeps 1.21
1994+
Module::Install::Admin::WriteAll 1.21
1995+
Module::Install::AutoInstall 1.21
1996+
Module::Install::Base 1.21
1997+
Module::Install::Base::FakeAdmin 1.21
1998+
Module::Install::Bundle 1.21
1999+
Module::Install::Can 1.21
2000+
Module::Install::Compiler 1.21
2001+
Module::Install::Deprecated 1.21
2002+
Module::Install::External 1.21
2003+
Module::Install::Fetch 1.21
2004+
Module::Install::Include 1.21
2005+
Module::Install::Inline 1.21
2006+
Module::Install::MakeMaker 1.21
2007+
Module::Install::Makefile 1.21
2008+
Module::Install::Metadata 1.21
2009+
Module::Install::PAR 1.21
2010+
Module::Install::Run 1.21
2011+
Module::Install::Scripts 1.21
2012+
Module::Install::Share 1.21
2013+
Module::Install::Win32 1.21
2014+
Module::Install::With 1.21
2015+
Module::Install::WriteAll 1.21
2016+
inc::Module::Install 1.21
2017+
requirements:
2018+
Devel::PPPort 3.16
2019+
ExtUtils::Install 1.52
2020+
ExtUtils::MakeMaker 6.59
2021+
ExtUtils::ParseXS 2.19
2022+
File::Path 0
2023+
File::Remove 1.42
2024+
File::Spec 3.28
2025+
Module::Build 0.29
2026+
Module::CoreList 2.17
2027+
Module::ScanDeps 1.09
2028+
Parse::CPAN::Meta 1.4413
2029+
Test::Harness 3.13
2030+
Test::More 0.86
2031+
YAML::Tiny 1.38
2032+
autodie 0
2033+
perl 5.006
2034+
Module-Install-AuthorTests-0.002
2035+
pathname: R/RJ/RJBS/Module-Install-AuthorTests-0.002.tar.gz
2036+
provides:
2037+
Module::Install::AuthorTests 0.002
2038+
requirements:
2039+
ExtUtils::MakeMaker 0
2040+
Module::Install 0
19412041
Module-Runtime-0.018
19422042
pathname: H/HA/HAARG/Module-Runtime-0.018.tar.gz
19432043
provides:
19442044
Module::Runtime 0.018
19452045
requirements:
19462046
ExtUtils::MakeMaker 0
19472047
perl 5.006000
2048+
Module-ScanDeps-1.37
2049+
pathname: R/RS/RSCHUPP/Module-ScanDeps-1.37.tar.gz
2050+
provides:
2051+
Module::ScanDeps 1.37
2052+
requirements:
2053+
ExtUtils::MakeMaker 0
2054+
File::Spec 0
2055+
File::Temp 0
2056+
Getopt::Long 0
2057+
List::Util 1.33
2058+
Module::Metadata 0
2059+
Text::ParseWords 0
2060+
perl 5.008009
2061+
version 0
19482062
Mojolicious-9.42
19492063
pathname: S/SR/SRI/Mojolicious-9.42.tar.gz
19502064
provides:
@@ -2596,6 +2710,23 @@ DISTRIBUTIONS
25962710
Test::More 0
25972711
parent 0
25982712
perl 5.008001
2713+
Plack-Middleware-Profiler-NYTProf-0.17
2714+
pathname: K/KI/KITANO/Plack-Middleware-Profiler-NYTProf-0.17.tar.gz
2715+
provides:
2716+
Plack::Middleware::Profiler::NYTProf 0.17
2717+
requirements:
2718+
Devel::NYTProf 5.06
2719+
Exporter 0
2720+
ExtUtils::MakeMaker 6.36
2721+
File::Spec 0
2722+
File::Temp 0
2723+
File::Which 0
2724+
Filter::Util::Call 0
2725+
Module::Install::AuthorTests 0
2726+
Plack 0
2727+
Test::More 0.98
2728+
Time::HiRes 0
2729+
parent 0
25992730
Plack-Middleware-ReverseProxy-0.16
26002731
pathname: M/MI/MIYAGAWA/Plack-Middleware-ReverseProxy-0.16.tar.gz
26012732
provides:
@@ -3576,6 +3707,20 @@ DISTRIBUTIONS
35763707
perl 5.008001
35773708
strict 0
35783709
warnings 0
3710+
YAML-Tiny-1.76
3711+
pathname: E/ET/ETHER/YAML-Tiny-1.76.tar.gz
3712+
provides:
3713+
YAML::Tiny 1.76
3714+
requirements:
3715+
B 0
3716+
Carp 0
3717+
Exporter 0
3718+
ExtUtils::MakeMaker 0
3719+
Fcntl 0
3720+
Scalar::Util 0
3721+
perl 5.008001
3722+
strict 0
3723+
warnings 0
35793724
common-sense-3.75
35803725
pathname: M/ML/MLEHMANN/common-sense-3.75.tar.gz
35813726
provides:
@@ -3741,15 +3886,12 @@ DISTRIBUTIONS
37413886
File::Basename 0
37423887
File::Compare 0
37433888
File::Path 0
3744-
HTTP::Negotiate 0
37453889
HTTP::Response 0
37463890
HTTP::Status 0
37473891
IO::File 0
37483892
IO::Socket::SSL 1.26
37493893
JSON 0
3750-
LWP 0
37513894
LWP::MediaTypes 0
3752-
LWP::Protocol 0
37533895
MIME::Base64 0
37543896
Test::More 0
37553897
Text::Soundex 0

0 commit comments

Comments
 (0)