← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:07 2021

Filename/usr/local/lib/perl5/site_perl/Locale/gettext_dumb.pm
StatementsExecuted 358110 statements in 616ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3581121301ms2.40sLocale::gettext_dumb::::dcnpgettextLocale::gettext_dumb::dcnpgettext
3466111167ms2.47sLocale::gettext_dumb::::gettextLocale::gettext_dumb::gettext
3581111140ms153msLocale::gettext_dumb::::__get_localeLocale::gettext_dumb::__get_locale
358111112.2ms12.2msLocale::gettext_dumb::::CORE:substLocale::gettext_dumb::CORE:subst (opcode)
1150119.23ms110msLocale::gettext_dumb::::dgettextLocale::gettext_dumb::dgettext
0000s0sLocale::gettext_dumb::::BEGIN@24Locale::gettext_dumb::BEGIN@24
0000s0sLocale::gettext_dumb::::BEGIN@26Locale::gettext_dumb::BEGIN@26
0000s0sLocale::gettext_dumb::::dcgettextLocale::gettext_dumb::dcgettext
0000s0sLocale::gettext_dumb::::dcngettextLocale::gettext_dumb::dcngettext
0000s0sLocale::gettext_dumb::::dcpgettextLocale::gettext_dumb::dcpgettext
0000s0sLocale::gettext_dumb::::dngettextLocale::gettext_dumb::dngettext
0000s0sLocale::gettext_dumb::::dnpgettextLocale::gettext_dumb::dnpgettext
0000s0sLocale::gettext_dumb::::dpgettextLocale::gettext_dumb::dpgettext
0000s0sLocale::gettext_dumb::::ngettextLocale::gettext_dumb::ngettext
0000s0sLocale::gettext_dumb::::npgettextLocale::gettext_dumb::npgettext
0000s0sLocale::gettext_dumb::::pgettextLocale::gettext_dumb::pgettext
0000s0sLocale::gettext_dumb::::setlocaleLocale::gettext_dumb::setlocale
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#! /bin/false
2
3# vim: set autoindent shiftwidth=4 tabstop=4:
4
5# Pure Perl implementation of Uniforum message translation.
6# Copyright (C) 2002-2017 Guido Flohr <guido.flohr@cantanea.com>,
7# all rights reserved.
8
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version.
13
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22package Locale::gettext_dumb;
23
24use Locale::gettext_pp;
25
26use vars qw (%EXPORT_TAGS @EXPORT_OK @ISA $VERSION);
27
28%EXPORT_TAGS = (locale_h => [ qw (gettext
29 dgettext
30 dcgettext
31 ngettext
32 dngettext
33 dcngettext
34 pgettext
35 dpgettext
36 dcpgettext
37 npgettext
38 dnpgettext
39 dcnpgettext
40 textdomain
41 bindtextdomain
42 bind_textdomain_codeset
43 )],
44 libintl_h => [ qw (LC_CTYPE
45 LC_NUMERIC
46 LC_TIME
47 LC_COLLATE
48 LC_MONETARY
49 LC_MESSAGES
50 LC_ALL)],
51 );
52
53@EXPORT_OK = qw (gettext
54 dgettext
55 dcgettext
56 ngettext
57 dngettext
58 dcngettext
59 pgettext
60 dpgettext
61 dcpgettext
62 npgettext
63 dnpgettext
64 dcnpgettext
65 textdomain
66 bindtextdomain
67 bind_textdomain_codeset
68 nl_putenv
69 setlocale
70 LC_CTYPE
71 LC_NUMERIC
72 LC_TIME
73 LC_COLLATE
74 LC_MONETARY
75 LC_MESSAGES
76 LC_ALL);
77
78@ISA = qw (Exporter);
79
80*Locale::gettext_dumb::textdomain = \&Locale::gettext_pp::textdomain;
81*Locale::gettext_dumb::bindtextdomain = \&Locale::gettext_pp::bindtextdomain;
82*Locale::gettext_dumb::bind_textdomain_codeset =
83 \&Locale::gettext_pp::bind_textdomain_codeset;
84
85*Locale::gettext_dumb::nl_putenv = \&Locale::gettext_pp::nl_putenv;
86
87*Locale::gettext_dumb::LC_CTYPE = \&Locale::gettext_pp::LC_CTYPE;
88*Locale::gettext_dumb::LC_NUMERIC = \&Locale::gettext_pp::LC_NUMERIC;
89*Locale::gettext_dumb::LC_TIME= \&Locale::gettext_pp::LC_TIME;
90*Locale::gettext_dumb::LC_COLLATE = \&Locale::gettext_pp::LC_COLLATE;
91*Locale::gettext_dumb::LC_MONETARY = \&Locale::gettext_pp::LC_MONETARY;
92*Locale::gettext_dumb::LC_MESSAGES = \&Locale::gettext_pp::LC_MESSAGES;
93*Locale::gettext_dumb::LC_ALL = \&Locale::gettext_pp::LC_ALL;
94
95
96
# spent 2.47s (167ms+2.30) within Locale::gettext_dumb::gettext which was called 34661 times, avg 71µs/call: # 34661 times (167ms+2.30s) by Locale::Messages::gettext at line 254 of Locale/Messages.pm, avg 71µs/call
sub gettext ($) {
973466110.2ms my ($msgid) = @_;
98
9934661122ms346612.30s return dcnpgettext ('', undef, $msgid, undef, undef, undef);
# spent 2.30s making 34661 calls to Locale::gettext_dumb::dcnpgettext, avg 66µs/call
100}
101
102
# spent 110ms (9.23+101) within Locale::gettext_dumb::dgettext which was called 1150 times, avg 95µs/call: # 1150 times (9.23ms+101ms) by Locale::Messages::dgettext at line 263 of Locale/Messages.pm, avg 95µs/call
sub dgettext ($$) {
1031150654µs my ($domainname, $msgid) = @_;
104
10511502.95ms1150101ms return dcnpgettext ($domainname, undef, $msgid, undef, undef, undef);
# spent 101ms making 1150 calls to Locale::gettext_dumb::dcnpgettext, avg 87µs/call
106}
107
108sub dcgettext ($$$) {
109 my ($domainname, $msgid, $category) = @_;
110
111 return dcnpgettext ($domainname, undef, $msgid, undef, undef, undef);
112}
113
114sub ngettext ($$$) {
115 my ($msgid, $msgid_plural, $n) = @_;
116
117 return dcnpgettext ('', undef, $msgid, $msgid_plural, $n, undef);
118}
119
120sub dngettext ($$$$) {
121 my ($domainname, $msgid, $msgid_plural, $n) = @_;
122
123 return dcnpgettext ($domainname, undef, $msgid, $msgid_plural, $n, undef);
124}
125
126sub dcngettext ($$$$$) {
127 my ($domainname, $msgid, $msgid_plural, $n, $category) = @_;
128
129 return dcnpgettext ($domainname, undef, $msgid, $msgid_plural, $n, ,
130 $category);
131}
132
133sub pgettext ($$) {
134 my ($msgctxt, $msgid) = @_;
135
136 return dcnpgettext ('', $msgctxt, $msgid, undef, undef, undef);
137}
138
139sub dpgettext ($$$) {
140 my ($domainname, $msgctxt, $msgid) = @_;
141
142 return dcnpgettext ($domainname, $msgctxt, $msgid, undef, undef, undef);
143}
144
145sub dcpgettext($$$$) {
146 my ($domainname, $msgctxt, $msgid, $category) = @_;
147
148 return dcnpgettext ($domainname, $msgctxt, $msgid, undef, undef, undef);
149}
150
151sub npgettext ($$$$) {
152 my ($msgctxt, $msgid, $msgid_plural, $n) = @_;
153
154 return dcnpgettext ('', $msgctxt, $msgid, $msgid_plural, $n, undef);
155}
156
157sub dnpgettext ($$$$$) {
158 my ($domainname, $msgctxt, $msgid, $msgid_plural, $n) = @_;
159
160 return dcnpgettext ($domainname, $msgctxt, $msgid, $msgid_plural, $n, undef);
161}
162
163
# spent 153ms (140+12.2) within Locale::gettext_dumb::__get_locale which was called 35811 times, avg 4µs/call: # 35811 times (140ms+12.2ms) by Locale::gettext_dumb::dcnpgettext at line 185, avg 4µs/call
sub __get_locale() {
164358114.70ms my $locale;
165
1663581119.9ms if (exists $ENV{LANGUAGE} && length $ENV{LANGUAGE}) {
1673581111.4ms $locale = $ENV{LANGUAGE};
1683581191.3ms3581112.2ms $locale =~ s/:.*//s;
# spent 12.2ms making 35811 calls to Locale::gettext_dumb::CORE:subst, avg 340ns/call
169 } elsif (exists $ENV{LC_ALL} && length $ENV{LC_ALL}) {
170 $locale = $ENV{LC_ALL};
171 } elsif (exists $ENV{LANG} && length $ENV{LANG}) {
172 $locale = $ENV{LANG};
173 } elsif (exists $ENV{LC_MESSAGES} && length $ENV{LC_MESSAGES}) {
174 $locale = $ENV{LC_MESSAGES};
175 } else {
176 $locale = 'C';
177 }
178
17935811147ms return $locale;
180}
181
182
# spent 2.40s (301ms+2.10) within Locale::gettext_dumb::dcnpgettext which was called 35811 times, avg 67µs/call: # 34661 times (286ms+2.02s) by Locale::gettext_dumb::gettext at line 99, avg 66µs/call # 1150 times (15.2ms+85.4ms) by Locale::gettext_dumb::dgettext at line 105, avg 87µs/call
sub dcnpgettext ($$$$$$) {
1833581117.2ms my ($domainname, $msgctxt, $msgid, $msgid_plural, $n, $category) = @_;
184
1853581136.4ms35811153ms my $locale = __get_locale;
# spent 153ms making 35811 calls to Locale::gettext_dumb::__get_locale, avg 4µs/call
186
18735811152ms358111.95s return Locale::gettext_pp::_dcnpgettext_impl ($domainname, $msgctxt,
# spent 1.95s making 35811 calls to Locale::gettext_pp::_dcnpgettext_impl, avg 54µs/call
188 $msgid, $msgid_plural, $n,
189 $category, $locale);
190}
191
192sub setlocale($;$) {
193 &POSIX::setlocale;
194}
195
1961;
197
198__END__
 
# spent 12.2ms within Locale::gettext_dumb::CORE:subst which was called 35811 times, avg 340ns/call: # 35811 times (12.2ms+0s) by Locale::gettext_dumb::__get_locale at line 168, avg 340ns/call
sub Locale::gettext_dumb::CORE:subst; # opcode