| Filename | /usr/libdata/perl5/OpenBSD/PackageRepository/Installed.pm |
| Statements | Executed 169 statements in 2.42ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 12 | 6 | 2 | 202µs | 436µs | OpenBSD::PackageRepositoryBase::url |
| 8 | 3 | 3 | 178µs | 395µs | OpenBSD::PackageRepositoryBase::new_location |
| 2 | 2 | 1 | 170µs | 6.38ms | OpenBSD::PackageRepositoryBase::parse_url |
| 3 | 1 | 1 | 82µs | 34.7ms | OpenBSD::PackageRepository::Installed::find |
| 6 | 2 | 1 | 58µs | 289ms | OpenBSD::PackageRepositoryBase::close_now |
| 7 | 1 | 1 | 49µs | 62µs | OpenBSD::PackageRepositoryBase::canonicalize |
| 2 | 1 | 1 | 48µs | 1.27s | OpenBSD::PackageRepositoryBase::match_locations |
| 2 | 2 | 1 | 44µs | 53µs | OpenBSD::PackageRepositoryBase::strip_urlscheme |
| 1 | 1 | 1 | 42µs | 3.80ms | OpenBSD::PackageRepositoryBase::expand_locations |
| 3 | 1 | 1 | 38µs | 38µs | OpenBSD::PackageRepository::Installed::new |
| 10 | 3 | 1 | 33µs | 33µs | OpenBSD::PackageRepositoryBase::CORE:subst (opcode) |
| 8 | 4 | 1 | 29µs | 29µs | OpenBSD::PackageRepositoryBase::CORE:match (opcode) |
| 1 | 1 | 1 | 24µs | 28µs | OpenBSD::PackageLocator::BEGIN@18.13 |
| 7 | 1 | 1 | 23µs | 23µs | OpenBSD::PackageRepositoryBase::locationClassName |
| 2 | 1 | 1 | 18µs | 18µs | OpenBSD::PackageRepositoryBase::CORE:substcont (opcode) |
| 1 | 1 | 1 | 17µs | 33µs | OpenBSD::PackageRepository::Installed::canonicalize |
| 1 | 1 | 1 | 16µs | 247µs | OpenBSD::PackageRepository::Installed::BEGIN@197 |
| 1 | 1 | 1 | 10µs | 17µs | OpenBSD::PackageLocator::BEGIN@19.14 |
| 1 | 1 | 1 | 5µs | 5µs | OpenBSD::PackageRepository::Installed::locationClassName |
| 2 | 1 | 1 | 5µs | 5µs | OpenBSD::PackageRepository::Installed::close |
| 1 | 1 | 1 | 3µs | 3µs | OpenBSD::PackageRepository::Installed::wipe_info |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::available |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::grabPlist |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::list |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::make_error_file |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::may_exist |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::relative_url |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::stemlist |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepository::Installed::urlscheme |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepositoryBase::close_after_error |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepositoryBase::close_with_client_error |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepositoryBase::finish_and_close |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepositoryBase::is_local_file |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepositoryBase::locations_list |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepositoryBase::parse_fullurl |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::PackageRepositoryBase::reinitialize |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # ex:ts=8 sw=4: | ||||
| 2 | # $OpenBSD: Installed.pm,v 1.38 2017/03/11 11:25:01 espie Exp $ | ||||
| 3 | # | ||||
| 4 | # Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org> | ||||
| 5 | # | ||||
| 6 | # Permission to use, copy, modify, and distribute this software for any | ||||
| 7 | # purpose with or without fee is hereby granted, provided that the above | ||||
| 8 | # copyright notice and this permission notice appear in all copies. | ||||
| 9 | # | ||||
| 10 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||||
| 11 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||||
| 12 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||||
| 13 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||||
| 14 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||||
| 15 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||||
| 16 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||
| 17 | |||||
| 18 | 2 | 28µs | 2 | 31µs | # spent 28µs (24+4) within OpenBSD::PackageLocator::BEGIN@18.13 which was called:
# once (24µs+4µs) by OpenBSD::PackageLocator::BEGIN@24.12 at line 18 # spent 28µs making 1 call to OpenBSD::PackageLocator::BEGIN@18.13
# spent 4µs making 1 call to strict::import |
| 19 | 2 | 985µs | 2 | 24µs | # spent 17µs (10+7) within OpenBSD::PackageLocator::BEGIN@19.14 which was called:
# once (10µs+7µs) by OpenBSD::PackageLocator::BEGIN@24.12 at line 19 # spent 17µs making 1 call to OpenBSD::PackageLocator::BEGIN@19.14
# spent 7µs making 1 call to warnings::import |
| 20 | |||||
| 21 | # XXX: we want to be able to load PackageRepository::Installed stand-alone, | ||||
| 22 | # so we put the only common method into PackageRepositoryBase. | ||||
| 23 | # | ||||
| 24 | # later, when we load the base PackageRepository, we tweak the inheritance | ||||
| 25 | # of PackageRepository::Installed to have full access... | ||||
| 26 | |||||
| 27 | package OpenBSD::PackageRepositoryBase; | ||||
| 28 | |||||
| 29 | 1 | 700ns | my ($version, $current); | ||
| 30 | |||||
| 31 | sub is_local_file | ||||
| 32 | { | ||||
| 33 | return 0; | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | sub expand_locations | ||||
| 37 | # spent 3.80ms (42µs+3.75) within OpenBSD::PackageRepositoryBase::expand_locations which was called:
# once (42µs+3.75ms) by OpenBSD::PackageRepositoryBase::parse_url at line 67 | ||||
| 38 | 1 | 2µs | my ($class, $string, $state) = @_; | ||
| 39 | 1 | 1µs | require OpenBSD::Paths; | ||
| 40 | 1 | 35µs | 1 | 3.75ms | if ($string eq '%a') { # spent 3.75ms making 1 call to OpenBSD::Paths::machine_architecture |
| 41 | return OpenBSD::Paths->machine_architecture; | ||||
| 42 | } elsif ($string eq '%v') { | ||||
| 43 | return OpenBSD::Paths->os_version; | ||||
| 44 | } elsif ($string eq '%m') { | ||||
| 45 | return join('/', | ||||
| 46 | 'pub/OpenBSD', | ||||
| 47 | '%c', | ||||
| 48 | 'packages', | ||||
| 49 | OpenBSD::Paths->machine_architecture); | ||||
| 50 | } | ||||
| 51 | } | ||||
| 52 | |||||
| 53 | sub parse_url | ||||
| 54 | # spent 6.38ms (170µs+6.21) within OpenBSD::PackageRepositoryBase::parse_url which was called 2 times, avg 3.19ms/call:
# once (139µs+6.20ms) by OpenBSD::PackageRepository::Distant::parse_url at line 586 of OpenBSD/PackageRepository.pm
# once (31µs+6µs) by OpenBSD::PackageRepository::Local::parse_fullurl at line 482 of OpenBSD/PackageRepository.pm | ||||
| 55 | 2 | 2µs | my ($class, $r, $state) = @_; | ||
| 56 | |||||
| 57 | 2 | 2µs | my $path; | ||
| 58 | |||||
| 59 | 2 | 10µs | 2 | 3µs | if ($$r =~ m/^(.*?)\:(.*)/) { # spent 3µs making 2 calls to OpenBSD::PackageRepositoryBase::CORE:match, avg 1µs/call |
| 60 | 1 | 1µs | $path = $1; | ||
| 61 | 1 | 2µs | $$r = $2; | ||
| 62 | } else { | ||||
| 63 | 1 | 800ns | $path = $$r; | ||
| 64 | 1 | 900ns | $$r = ''; | ||
| 65 | } | ||||
| 66 | |||||
| 67 | 3 | 46µs | 5 | 3.82ms | $path =~ s/\%[vam]\b/$class->expand_locations($&, $state)/ge; # spent 3.80ms making 1 call to OpenBSD::PackageRepositoryBase::expand_locations
# spent 18µs making 2 calls to OpenBSD::PackageRepositoryBase::CORE:substcont, avg 9µs/call
# spent 3µs making 2 calls to OpenBSD::PackageRepositoryBase::CORE:subst, avg 2µs/call |
| 68 | # make %c magical: if we're on a release, we expand into | ||||
| 69 | # stable, and leave the release dir for the full object with | ||||
| 70 | # host to push back | ||||
| 71 | 2 | 2µs | my $release; | ||
| 72 | 2 | 22µs | 2 | 13µs | if ($path =~ m/\%c\b/) { # spent 13µs making 2 calls to OpenBSD::PackageRepositoryBase::CORE:match, avg 7µs/call |
| 73 | 1 | 36µs | 2 | 2.35ms | my $d = $state->defines('snap') ? # spent 2.31ms making 1 call to OpenBSD::Paths::os_directory
# spent 38µs making 1 call to OpenBSD::State::defines |
| 74 | 'snapshots' : OpenBSD::Paths->os_directory; | ||||
| 75 | 1 | 2µs | if ($d ne 'snapshots' && $path =~ m,\%c/packages/,) { | ||
| 76 | $release = $path; | ||||
| 77 | $release =~ s,\%c\b,$d,; | ||||
| 78 | $path =~ s,\%c/packages/,$d/packages-stable/,; | ||||
| 79 | } else { | ||||
| 80 | 1 | 23µs | 1 | 17µs | $path =~ s,\%c\b,$d,; # spent 17µs making 1 call to OpenBSD::PackageRepositoryBase::CORE:subst |
| 81 | } | ||||
| 82 | } | ||||
| 83 | 2 | 17µs | 2 | 8µs | $path .= '/' unless $path =~ m/\/$/; # spent 8µs making 2 calls to OpenBSD::PackageRepositoryBase::CORE:match, avg 4µs/call |
| 84 | 2 | 47µs | bless { path => $path, release => $release, state => $state }, $class; | ||
| 85 | } | ||||
| 86 | |||||
| 87 | sub parse_fullurl | ||||
| 88 | { | ||||
| 89 | my ($class, $r, $state) = @_; | ||||
| 90 | |||||
| 91 | $class->strip_urlscheme($r) or return undef; | ||||
| 92 | return $class->parse_url($r, $state); | ||||
| 93 | } | ||||
| 94 | |||||
| 95 | sub strip_urlscheme | ||||
| 96 | # spent 53µs (44+9) within OpenBSD::PackageRepositoryBase::strip_urlscheme which was called 2 times, avg 27µs/call:
# once (30µs+5µs) by OpenBSD::PackageRepository::Local::parse_fullurl at line 481 of OpenBSD/PackageRepository.pm
# once (14µs+4µs) by OpenBSD::PackageRepository::parse_fullurl at line 97 of OpenBSD/PackageRepository.pm | ||||
| 97 | 2 | 2µs | my ($class, $r) = @_; | ||
| 98 | 2 | 15µs | 2 | 5µs | if ($$r =~ m/^(.*?)\:(.*)$/) { # spent 5µs making 2 calls to OpenBSD::PackageRepositoryBase::CORE:match, avg 2µs/call |
| 99 | 2 | 14µs | my $scheme = lc($1); | ||
| 100 | 2 | 7µs | 2 | 4µs | if ($scheme eq $class->urlscheme) { # spent 2µs making 1 call to OpenBSD::PackageRepository::HTTP::urlscheme
# spent 2µs making 1 call to OpenBSD::PackageRepository::Local::urlscheme |
| 101 | 1 | 2µs | $$r = $2; | ||
| 102 | 1 | 7µs | return 1; | ||
| 103 | } | ||||
| 104 | } | ||||
| 105 | 1 | 5µs | return 0; | ||
| 106 | } | ||||
| 107 | |||||
| 108 | sub match_locations | ||||
| 109 | # spent 1.27s (48µs+1.27) within OpenBSD::PackageRepositoryBase::match_locations which was called 2 times, avg 634ms/call:
# 2 times (48µs+1.27s) by OpenBSD::PackageRepositoryList::match_locations at line 84 of OpenBSD/PackageRepositoryList.pm, avg 634ms/call | ||||
| 110 | 2 | 2µs | my ($self, $search, @filters) = @_; | ||
| 111 | 2 | 31µs | 2 | 1.27s | my $l = $search->match_locations($self); # spent 1.27s making 2 calls to OpenBSD::Search::match_locations, avg 634ms/call |
| 112 | 2 | 5µs | while (my $filter = (shift @filters)) { | ||
| 113 | last if @$l == 0; # don't bother filtering empty list | ||||
| 114 | $l = $filter->filter_locations($l); | ||||
| 115 | } | ||||
| 116 | 2 | 8µs | return $l; | ||
| 117 | } | ||||
| 118 | |||||
| 119 | sub url | ||||
| 120 | # spent 436µs (202+234) within OpenBSD::PackageRepositoryBase::url which was called 12 times, avg 36µs/call:
# 3 times (55µs+60µs) by OpenBSD::PackageRepository::parse_problems at line 286 of OpenBSD/PackageRepository.pm, avg 38µs/call
# 2 times (66µs+77µs) by OpenBSD::PackageLocation::_opened at line 88 of OpenBSD/PackageLocation.pm, avg 72µs/call
# 2 times (39µs+43µs) by OpenBSD::PackageRepository::unique at line 75 of OpenBSD/PackageRepository.pm, avg 41µs/call
# 2 times (16µs+23µs) by OpenBSD::PackageLocation::url at line 41 of OpenBSD/PackageLocation.pm, avg 19µs/call
# 2 times (16µs+20µs) by OpenBSD::PackageRepository::unique at line 78 of OpenBSD/PackageRepository.pm, avg 18µs/call
# once (11µs+12µs) by OpenBSD::PackageRepository::HTTPorFTP::get_http_list at line 909 of OpenBSD/PackageRepository.pm | ||||
| 121 | 12 | 19µs | my ($self, $name) = @_; | ||
| 122 | 12 | 153µs | 24 | 234µs | return $self->urlscheme.':'.$self->relative_url($name); # spent 190µs making 12 calls to OpenBSD::PackageRepository::relative_url, avg 16µs/call
# spent 41µs making 10 calls to OpenBSD::PackageRepository::HTTP::urlscheme, avg 4µs/call
# spent 3µs making 2 calls to OpenBSD::PackageRepository::Local::urlscheme, avg 2µs/call |
| 123 | } | ||||
| 124 | |||||
| 125 | sub finish_and_close | ||||
| 126 | { | ||||
| 127 | my ($self, $object) = @_; | ||||
| 128 | $self->close($object); | ||||
| 129 | } | ||||
| 130 | |||||
| 131 | sub close_now | ||||
| 132 | # spent 289ms (58µs+289) within OpenBSD::PackageRepositoryBase::close_now which was called 6 times, avg 48.1ms/call:
# 3 times (39µs+289ms) by OpenBSD::PackageLocation::close_now at line 264 of OpenBSD/PackageLocation.pm, avg 96.3ms/call
# 3 times (19µs+32µs) by OpenBSD::PackageLocation::wipe_info at line 210 of OpenBSD/PackageLocation.pm, avg 17µs/call | ||||
| 133 | 6 | 6µs | my ($self, $object) = @_; | ||
| 134 | 6 | 51µs | 6 | 289ms | $self->close($object, 0); # spent 289ms making 4 calls to OpenBSD::PackageRepository::close, avg 72.2ms/call
# spent 5µs making 2 calls to OpenBSD::PackageRepository::Installed::close, avg 2µs/call |
| 135 | } | ||||
| 136 | |||||
| 137 | sub close_after_error | ||||
| 138 | { | ||||
| 139 | my ($self, $object) = @_; | ||||
| 140 | $self->close($object, 1); | ||||
| 141 | } | ||||
| 142 | |||||
| 143 | sub close_with_client_error | ||||
| 144 | { | ||||
| 145 | my ($self, $object) = @_; | ||||
| 146 | $self->close($object, 1); | ||||
| 147 | } | ||||
| 148 | |||||
| 149 | sub canonicalize | ||||
| 150 | # spent 62µs (49+13) within OpenBSD::PackageRepositoryBase::canonicalize which was called 7 times, avg 9µs/call:
# 7 times (49µs+13µs) by OpenBSD::PackageLocation::new at line 31 of OpenBSD/PackageLocation.pm, avg 9µs/call | ||||
| 151 | 7 | 5µs | my ($self, $name) = @_; | ||
| 152 | |||||
| 153 | 7 | 10µs | if (defined $name) { | ||
| 154 | 7 | 33µs | 7 | 13µs | $name =~ s/\.tgz$//o; # spent 13µs making 7 calls to OpenBSD::PackageRepositoryBase::CORE:subst, avg 2µs/call |
| 155 | } | ||||
| 156 | 7 | 22µs | return $name; | ||
| 157 | } | ||||
| 158 | |||||
| 159 | sub new_location | ||||
| 160 | # spent 395µs (178+217) within OpenBSD::PackageRepositoryBase::new_location which was called 8 times, avg 49µs/call:
# 4 times (45µs+84µs) by OpenBSD::PackageRepository::find at line 266 of OpenBSD/PackageRepository.pm, avg 32µs/call
# 3 times (93µs+81µs) by OpenBSD::Search::match_locations at line 27 of OpenBSD/Search.pm, avg 58µs/call
# once (40µs+52µs) by OpenBSD::PackageRepository::Installed::find at line 234 | ||||
| 161 | 8 | 9µs | my ($self, @args) = @_; | ||
| 162 | |||||
| 163 | 8 | 106µs | 16 | 217µs | return $self->locationClassName->new($self, @args); # spent 189µs making 8 calls to OpenBSD::PackageLocation::new, avg 24µs/call
# spent 23µs making 7 calls to OpenBSD::PackageRepositoryBase::locationClassName, avg 3µs/call
# spent 5µs making 1 call to OpenBSD::PackageRepository::Installed::locationClassName |
| 164 | } | ||||
| 165 | |||||
| 166 | sub locationClassName | ||||
| 167 | 7 | 78µs | # spent 23µs within OpenBSD::PackageRepositoryBase::locationClassName which was called 7 times, avg 3µs/call:
# 7 times (23µs+0s) by OpenBSD::PackageRepositoryBase::new_location at line 163, avg 3µs/call | ||
| 168 | |||||
| 169 | sub locations_list | ||||
| 170 | { | ||||
| 171 | my $self = shift; | ||||
| 172 | if (!defined $self->{locations}) { | ||||
| 173 | my $l = []; | ||||
| 174 | require OpenBSD::PackageLocation; | ||||
| 175 | |||||
| 176 | for my $name (@{$self->list}) { | ||||
| 177 | push @$l, $self->new_location($name); | ||||
| 178 | } | ||||
| 179 | $self->{locations} = $l; | ||||
| 180 | } | ||||
| 181 | return $self->{locations}; | ||||
| 182 | } | ||||
| 183 | |||||
| 184 | sub reinitialize | ||||
| 185 | { | ||||
| 186 | } | ||||
| 187 | |||||
| 188 | package OpenBSD::PackageRepository::Installed; | ||||
| 189 | |||||
| 190 | 1 | 8µs | our @ISA = (qw(OpenBSD::PackageRepositoryBase)); | ||
| 191 | |||||
| 192 | sub urlscheme | ||||
| 193 | { | ||||
| 194 | return 'inst'; | ||||
| 195 | } | ||||
| 196 | |||||
| 197 | 1 | 1µs | # spent 247µs (16+231) within OpenBSD::PackageRepository::Installed::BEGIN@197 which was called:
# once (16µs+231µs) by OpenBSD::PackageLocator::BEGIN@24.12 at line 198 | ||
| 198 | 1 | 397µs | 2 | 478µs | installed_packages installed_stems installed_name)); # spent 247µs making 1 call to OpenBSD::PackageRepository::Installed::BEGIN@197
# spent 231µs making 1 call to Exporter::import |
| 199 | |||||
| 200 | sub new | ||||
| 201 | # spent 38µs within OpenBSD::PackageRepository::Installed::new which was called 3 times, avg 13µs/call:
# 3 times (38µs+0s) by OpenBSD::PackageRepositoryFactory::installed at line 40 of OpenBSD/State.pm, avg 13µs/call | ||||
| 202 | 3 | 4µs | my ($class, $all, $state) = @_; | ||
| 203 | 3 | 21µs | return bless { all => $all, state => $state }, $class; | ||
| 204 | } | ||||
| 205 | |||||
| 206 | sub relative_url | ||||
| 207 | { | ||||
| 208 | my ($self, $name) = @_; | ||||
| 209 | $name or ''; | ||||
| 210 | } | ||||
| 211 | |||||
| 212 | sub close | ||||
| 213 | 2 | 9µs | # spent 5µs within OpenBSD::PackageRepository::Installed::close which was called 2 times, avg 2µs/call:
# 2 times (5µs+0s) by OpenBSD::PackageRepositoryBase::close_now at line 134, avg 2µs/call | ||
| 214 | } | ||||
| 215 | |||||
| 216 | sub make_error_file | ||||
| 217 | { | ||||
| 218 | } | ||||
| 219 | |||||
| 220 | sub canonicalize | ||||
| 221 | # spent 33µs (17+16) within OpenBSD::PackageRepository::Installed::canonicalize which was called:
# once (17µs+16µs) by OpenBSD::PackageLocation::new at line 31 of OpenBSD/PackageLocation.pm | ||||
| 222 | 1 | 1µs | my ($self, $name) = @_; | ||
| 223 | 1 | 9µs | 1 | 16µs | return installed_name($name); # spent 16µs making 1 call to OpenBSD::PackageInfo::installed_name |
| 224 | } | ||||
| 225 | |||||
| 226 | sub find | ||||
| 227 | # spent 34.7ms (82µs+34.6) within OpenBSD::PackageRepository::Installed::find which was called 3 times, avg 11.6ms/call:
# 3 times (82µs+34.6ms) by OpenBSD::PkgInfo::find_pkg_in at line 222 of OpenBSD/PkgInfo.pm, avg 11.6ms/call | ||||
| 228 | 3 | 3µs | my ($repository, $name, $arch) = @_; | ||
| 229 | 3 | 2µs | my $self; | ||
| 230 | |||||
| 231 | 3 | 21µs | 3 | 34.5ms | if (is_installed($name)) { # spent 34.5ms making 3 calls to OpenBSD::PackageInfo::is_installed, avg 11.5ms/call |
| 232 | 1 | 1µs | require OpenBSD::PackageLocation; | ||
| 233 | |||||
| 234 | 1 | 22µs | 1 | 93µs | $self = $repository->new_location($name); # spent 93µs making 1 call to OpenBSD::PackageRepositoryBase::new_location |
| 235 | 1 | 16µs | 1 | 55µs | $self->{dir} = installed_info($name); # spent 55µs making 1 call to OpenBSD::PackageInfo::installed_info |
| 236 | } | ||||
| 237 | 3 | 12µs | return $self; | ||
| 238 | } | ||||
| 239 | |||||
| 240 | sub locationClassName | ||||
| 241 | 1 | 18µs | # spent 5µs within OpenBSD::PackageRepository::Installed::locationClassName which was called:
# once (5µs+0s) by OpenBSD::PackageRepositoryBase::new_location at line 163 | ||
| 242 | |||||
| 243 | sub grabPlist | ||||
| 244 | { | ||||
| 245 | my ($repository, $name, $arch, $code) = @_; | ||||
| 246 | require OpenBSD::PackingList; | ||||
| 247 | return OpenBSD::PackingList->from_installation($name, $code); | ||||
| 248 | } | ||||
| 249 | |||||
| 250 | sub available | ||||
| 251 | { | ||||
| 252 | my $self = shift; | ||||
| 253 | return installed_packages($self->{all}); | ||||
| 254 | } | ||||
| 255 | |||||
| 256 | sub list | ||||
| 257 | { | ||||
| 258 | my $self = shift; | ||||
| 259 | my @list = installed_packages($self->{all}); | ||||
| 260 | return \@list; | ||||
| 261 | } | ||||
| 262 | |||||
| 263 | sub stemlist | ||||
| 264 | { | ||||
| 265 | return installed_stems(); | ||||
| 266 | } | ||||
| 267 | |||||
| 268 | sub wipe_info | ||||
| 269 | 1 | 10µs | # spent 3µs within OpenBSD::PackageRepository::Installed::wipe_info which was called:
# once (3µs+0s) by OpenBSD::PackageLocation::wipe_info at line 209 of OpenBSD/PackageLocation.pm | ||
| 270 | } | ||||
| 271 | |||||
| 272 | sub may_exist | ||||
| 273 | { | ||||
| 274 | my ($self, $name) = @_; | ||||
| 275 | return is_installed($name); | ||||
| 276 | } | ||||
| 277 | |||||
| 278 | 1 | 5µs | 1; | ||
# spent 29µs within OpenBSD::PackageRepositoryBase::CORE:match which was called 8 times, avg 4µs/call:
# 2 times (13µs+0s) by OpenBSD::PackageRepositoryBase::parse_url at line 72, avg 7µs/call
# 2 times (8µs+0s) by OpenBSD::PackageRepositoryBase::parse_url at line 83, avg 4µs/call
# 2 times (5µs+0s) by OpenBSD::PackageRepositoryBase::strip_urlscheme at line 98, avg 2µs/call
# 2 times (3µs+0s) by OpenBSD::PackageRepositoryBase::parse_url at line 59, avg 1µs/call | |||||
# spent 33µs within OpenBSD::PackageRepositoryBase::CORE:subst which was called 10 times, avg 3µs/call:
# 7 times (13µs+0s) by OpenBSD::PackageRepositoryBase::canonicalize at line 154, avg 2µs/call
# 2 times (3µs+0s) by OpenBSD::PackageRepositoryBase::parse_url at line 67, avg 2µs/call
# once (17µs+0s) by OpenBSD::PackageRepositoryBase::parse_url at line 80 | |||||
# spent 18µs within OpenBSD::PackageRepositoryBase::CORE:substcont which was called 2 times, avg 9µs/call:
# 2 times (18µs+0s) by OpenBSD::PackageRepositoryBase::parse_url at line 67, avg 9µs/call |