App-Prun-Scaled
view release on metacpan or search on metacpan
Run tkprof against all .trc files in the current directory while
attempting to keep the system 75% idle, don't adjust the number of
processes unless idle time goes below 74 or above 76, and re-evaluate
after each process exits (update frequency = 0).
for F in *.trc; do echo "tkprof $F ${F%trc}txt"; done | sprun -t 75 -T 2 -u 0
Run all commands in a file (command_file), one line at a time. Manually
bound the minimum and maximum number of processes to run and start with
4. Keep the CPU 100% busy (0% idle) and re-evaluate at most every 3
seconds. Ignore any failed processes, but do report to STDOUT any that
fail.
sprun -e -r -m 2 -M 8 -i 4 -u 3 command_file
Test with the dummy_load script included in the contrib/ directory of
this distribution:
for F in `seq 1 100`; do echo "contrib/dummy_load"; done | sprun -v
contrib/dummy_load view on Meta::CPAN
#!/usr/bin/env perl
use warnings;
use strict;
srand($$);
my $start = time;
my $lifespan = 5+int(rand(10));
# Keep the CPU busy until it's time to exit
while (time - $start < $lifespan) {
my $a = time;
my $b = $a^time/3;
}
exit 0;
lib/App/Prun/Scaled.pm view on Meta::CPAN
Run tkprof against all .trc files in the current directory
while attempting to keep the system 75% idle, don't adjust the
number of processes unless idle time goes below 74 or above 76, and
re-evaluate after each process exits (update frequency = 0).
for F in *.trc; do echo "tkprof $F ${F%trc}txt"; done | sprun -t 75 -T 2 -u 0
Run all commands in a file (command_file), one line at a time. Manually
bound the minimum and maximum number of processes to run and start with 4.
Keep the CPU 100% busy (0% idle) and re-evaluate at most every 3 seconds.
Ignore any failed processes, but do report to STDOUT any that fail.
sprun -e -r -m 2 -M 8 -i 4 -u 3 command_file
Test with the dummy_load script included in the contrib/ directory
of this distribution:
for F in `seq 1 100`; do echo "contrib/dummy_load"; done | sprun -v
=head1 AUTHOR
script/sprun view on Meta::CPAN
EXAMPLES
# Run tkprof against all .trc files in the current directory
# while attempting to keep the system 75% idle, don't adjust the
# number of processes unless idle time goes below 74 or above 76, and
# re-evaluate after each process exits (update frequency = 0).
for F in *.trc; do echo "tkprof \$F \${F%trc}txt"; done | $me -t 75 -T 2 -u 0
# Run all commands in a file (command_file), one line at a time. Manually
# bound the minimum and maximum number of processes to run and start with 4.
# Keep the CPU 100% busy (0% idle) and re-evaluate at most every 3 seconds.
# Ignore any failed processes, but do report to STDOUT any that fail.
$me -e -r -m 2 -M 8 -i 4 -u 3 command_file
EOT
exit 1;
}
sub get_opts {
my %opts;
Getopt::Long::Configure('bundling');
( run in 0.741 second using v1.01-cache-2.11-cpan-87723dcf8b7 )