+25Jul16=======================================================================
+1. Add some timing stats to cmd spawn_cmd.
08Jul16=======================================================================
1. Add latest wpxloc.raw
2. Add CTY-2609
use DXXml;
use AsyncMsg;
use JSON;
+use Time::HiRes qw(gettimeofday tv_interval);
use Mojo::IOLoop;
use Mojo::IOLoop::ForkCall;
$self->send_file($motd) if -e $motd;
}
+sub _diffms
+{
+ return unless isdbg('chan');
+ my $call = shift;
+ my $a = shift;
+ my $b = shift || [gettimeofday];
+ my $prefix = shift;
+
+ my $secs = $b->[0] - $a->[0];
+ my $msecs = int(($b->[1] - $a->[1]) / 1000);
+
+ my $s = "forkcall stats: $call ";
+ $s .= "$prefix " if $prefix;
+ $s .= "${secs}S" if $secs;
+ $s .= "${msecs}mS";
+ dbg($s);
+}
+
# Punt off a long running command into a separate process
#
# This is called from commands to run some potentially long running
my $prefix = delete $args{prefix};
my $progress = delete $args{progress};
my $args = delete $args{args} || [];
+ my $t0 = [gettimeofday];
no strict 'refs';
$dxchan->send(@res);
}
}
+ _diffms($call, $t0, [gettimeofday], $prefix);
});
+
return @out;
}