mirror of
https://bitbucket.org/swgmasters/client-tools.git
synced 2026-01-17 00:04:42 -05:00
32 lines
510 B
Perl
32 lines
510 B
Perl
#! /usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
my $minimumTime = 0.0;
|
|
|
|
if (@ARGV >= 2 && $ARGV[0] eq "-m")
|
|
{
|
|
shift;
|
|
$minimumTime = shift;
|
|
}
|
|
|
|
die "usage: $0 [-m time] logfile\n\t-m = minimum time (in seconds) to report\n" if (@ARGV != 1 || $ARGV[0] =~ /^[-\?\/]/);
|
|
|
|
my @reverse;
|
|
while (<>)
|
|
{
|
|
next if (s/InstallTimer: // == 0);
|
|
push(@reverse, $_);
|
|
}
|
|
|
|
while (@reverse)
|
|
{
|
|
$_ = pop(@reverse);
|
|
my $line = $_;
|
|
chomp;
|
|
s/^\s+//;
|
|
my ($time, $whom) = split(/\s+/, $_);
|
|
print $line if ($time >= $minimumTime);
|
|
}
|