chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
routesearch: fix up web performance parameterisation
[ypp-sc-tools.web-test.git]
/
yarrg
/
web
/
query_routesearch
diff --git
a/yarrg/web/query_routesearch
b/yarrg/web/query_routesearch
index 587a2b6dc9df0a47c1e8f55192a8f2d96123bb43..b6d543fae1c7c122c72485a36c5bf30146f4505b 100644
(file)
--- a/
yarrg/web/query_routesearch
+++ b/
yarrg/web/query_routesearch
@@
-52,11
+52,13
@@
my $emsg;
my @warningfs;
my @islandids;
my @warningfs;
my @islandids;
+my $maxmaxdist=35;
+my $maxcpu=90;
+
my $qa= \%ARGS;
my $routeparams= { EmsgRef => \$emsg, SayRequiredCapacity => 1 };
my $maxdist;
my $maxcountea=10;
my $qa= \%ARGS;
my $routeparams= { EmsgRef => \$emsg, SayRequiredCapacity => 1 };
my $maxdist;
my $maxcountea=10;
-my $maxcpu=10;
</%perl>
</%perl>
@@
-95,8
+97,8
@@
This feature is not available from the "drop down menus" interface.
</form>
<%perl>
</form>
<%perl>
-if (!$emsg && $maxdist >
30
) {
- $emsg= "Searching for routes of more than
30
leagues is not".
+if (!$emsg && $maxdist >
$maxmaxdist
) {
+ $emsg= "Searching for routes of more than
$maxmaxdist
leagues is not".
" supported, sorry.";
}
" supported, sorry.";
}
@@
-152,7
+154,7
@@
my $child= $fh->open("-|"); defined $child or die $!;
if (!$child) {
my $cpu= BSD::Resource::RLIMIT_CPU;
my ($soft,$hard)= getrlimit($cpu);
if (!$child) {
my $cpu= BSD::Resource::RLIMIT_CPU;
my ($soft,$hard)= getrlimit($cpu);
- setrlimit($cpu,$maxcpu,$hard) or die $! if $
soft>
$maxcpu;
+ setrlimit($cpu,$maxcpu,$hard) or die $! if $
hard<=
$maxcpu;
exec @rsargs;
die $!;
}
exec @rsargs;
die $!;
}