projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4db91b5
)
add cmd line to forkcall stats
author
Dirk Koopman
<djk@tobit.co.uk>
Mon, 25 Jul 2016 17:55:54 +0000
(18:55 +0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Mon, 25 Jul 2016 17:55:54 +0000
(18:55 +0100)
16 files changed:
cmd/show/announce.pl
patch
|
blob
|
history
cmd/show/chat.pl
patch
|
blob
|
history
cmd/show/dx.pl
patch
|
blob
|
history
cmd/show/groups.pl
patch
|
blob
|
history
cmd/show/hfstats.pl
patch
|
blob
|
history
cmd/show/hftable.pl
patch
|
blob
|
history
cmd/show/isolate.pl
patch
|
blob
|
history
cmd/show/lockout.pl
patch
|
blob
|
history
cmd/show/log.pl
patch
|
blob
|
history
cmd/show/rcmd.pl
patch
|
blob
|
history
cmd/show/registered.pl
patch
|
blob
|
history
cmd/show/talk.pl
patch
|
blob
|
history
cmd/show/vhfstats.pl
patch
|
blob
|
history
cmd/show/vhftable.pl
patch
|
blob
|
history
cmd/show/wx.pl
patch
|
blob
|
history
perl/DXCommandmode.pm
patch
|
blob
|
history
diff --git
a/cmd/show/announce.pl
b/cmd/show/announce.pl
index 3454140ecf3abe96d3b7f112794982d70aca0322..77811449638fd01210511bb03119d8b33dd17ef3 100644
(file)
--- a/
cmd/show/announce.pl
+++ b/
cmd/show/announce.pl
@@
-34,7
+34,7
@@
while ($f = shift @f) { # next field
$to = 20 unless $to;
$from = 0 unless $from;
$to = 20 unless $to;
$from = 0 unless $from;
-@out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, 'ann', $who]);
+@out = $self->spawn_cmd(
"show/announce $cmdline",
\&DXLog::print, args => [$from, $to, $main::systime, 'ann', $who]);
#@out = DXLog::print($from, $to, $main::systime, 'ann', $who);
return (1, @out);
#@out = DXLog::print($from, $to, $main::systime, 'ann', $who);
return (1, @out);
diff --git
a/cmd/show/chat.pl
b/cmd/show/chat.pl
index 5ac6312e2714218e9af1f0f40e5abbd4df356467..38d5b38ab8af5b813e0bb0bc37028e3f9c167f15 100644
(file)
--- a/
cmd/show/chat.pl
+++ b/
cmd/show/chat.pl
@@
-34,7
+34,7
@@
while ($f = shift @f) { # next field
$to = 20 unless $to;
$from = 0 unless $from;
$to = 20 unless $to;
$from = 0 unless $from;
-@out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, 'chat', $who]);
+@out = $self->spawn_cmd(
"show/chat $cmdline",
\&DXLog::print, args => [$from, $to, $main::systime, 'chat', $who]);
#@out = DXLog::print($from, $to, $main::systime, 'chat', $who);
return (1, @out);
#@out = DXLog::print($from, $to, $main::systime, 'chat', $who);
return (1, @out);
diff --git
a/cmd/show/dx.pl
b/cmd/show/dx.pl
index 15eaffd0d5a434feb986827389f838552dbab50e..1170a3447e5e333d3c1659458ecf8f04d811a33b 100644
(file)
--- a/
cmd/show/dx.pl
+++ b/
cmd/show/dx.pl
@@
-385,7
+385,7
@@
if ($doqra) {
# now do the search
# now do the search
-push @out, $self->spawn_cmd(\&Spot::search,
+push @out, $self->spawn_cmd(
"sh/dx $line",
\&Spot::search,
args => [$expr, $fromday, $today, $from, $to, $hint, $dofilter ? $self : undef],
cb => sub {
my ($dxchan, @res) = @_;
args => [$expr, $fromday, $today, $from, $to, $hint, $dofilter ? $self : undef],
cb => sub {
my ($dxchan, @res) = @_;
diff --git
a/cmd/show/groups.pl
b/cmd/show/groups.pl
index 48ab9e10d4bcb093141898673112e0f798ec9556..26aad008a88a3dcb05a9738f88bca87c1cb48d72 100644
(file)
--- a/
cmd/show/groups.pl
+++ b/
cmd/show/groups.pl
@@
-20,7
+20,7
@@
sub handle
my @out;
$to = 500 unless $to;
my @out;
$to = 500 unless $to;
- @out = $self->spawn_cmd(\&DXLog::print,
+ @out = $self->spawn_cmd(
"show/groups $to",
\&DXLog::print,
args => [0, $to, $main::systime, 'chat', undef],
cb => sub {
my $self = shift;
args => [0, $to, $main::systime, 'chat', undef],
cb => sub {
my $self = shift;
diff --git
a/cmd/show/hfstats.pl
b/cmd/show/hfstats.pl
index c2e055f7d0f878097e00034ee924dce2fe597024..5cee6593e5e758702fb27e9d0df755f856162432 100644
(file)
--- a/
cmd/show/hfstats.pl
+++ b/
cmd/show/hfstats.pl
@@
-53,7
+53,7
@@
$now = Julian::Day->new($utime);
$now = $now->sub($days);
$date = cldate($utime);
$now = $now->sub($days);
$date = cldate($utime);
-@out = $self->spawn_cmd(sub {
+@out = $self->spawn_cmd(
"show/hfstats $line",
sub {
my %list;
my @out;
my @in;
my %list;
my @out;
my @in;
diff --git
a/cmd/show/hftable.pl
b/cmd/show/hftable.pl
index 25cb9c0ba9d4f786a381ae4ac30aca0bc5e5473d..40f8d2ca93f7580aa644bb6b967edd1340c4cb83 100644
(file)
--- a/
cmd/show/hftable.pl
+++ b/
cmd/show/hftable.pl
@@
-95,7
+95,7
@@
unless ($now) {
$date = cldate(time);
}
$date = cldate(time);
}
-@out = $self->spawn_cmd(sub {
+@out = $self->spawn_cmd(
"show/hftable $line",
sub {
my %list;
my @out;
my $i;
my %list;
my @out;
my $i;
diff --git
a/cmd/show/isolate.pl
b/cmd/show/isolate.pl
index 979bf0d3021645d03b77bce0934cef78bcb32f28..3c0939c9cdf6f9d5c3281573d5027004055b232d 100644
(file)
--- a/
cmd/show/isolate.pl
+++ b/
cmd/show/isolate.pl
@@
-15,7
+15,7
@@
my @out;
use DB_File;
use DB_File;
-@out = $self->spawn_cmd(sub {
+@out = $self->spawn_cmd(
"show/isolate $line",
sub {
my @out;
my @val;
my @out;
my @val;
diff --git
a/cmd/show/lockout.pl
b/cmd/show/lockout.pl
index d2133df5ce3d41651f4fca503a64caf974c99938..e97b4bcf34c53436429478592a624ac2bd8fe5f4 100644
(file)
--- a/
cmd/show/lockout.pl
+++ b/
cmd/show/lockout.pl
@@
-22,7
+22,7
@@
if ($line) {
return (1, $self->msg('lockoutuse')) unless $line;
return (1, $self->msg('lockoutuse')) unless $line;
-@out = $self->spawn_cmd(sub {
+@out = $self->spawn_cmd(
"show lockout $line",
sub {
my @out;
my @val;
my ($action, $count, $key, $data) = (0,0,0,0);
my @out;
my @val;
my ($action, $count, $key, $data) = (0,0,0,0);
diff --git
a/cmd/show/log.pl
b/cmd/show/log.pl
index 18d9405091f8e6132640a74d4be5860003c56b4a..29d2b51232aca51f3bae521e98ce2ac42b18d1e5 100644
(file)
--- a/
cmd/show/log.pl
+++ b/
cmd/show/log.pl
@@
-41,7
+41,7
@@
sub handle
$who = $self->call;
}
$who = $self->call;
}
- @out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, undef, $who]);
+ @out = $self->spawn_cmd(
"show/log $cmdline",
\&DXLog::print, args => [$from, $to, $main::systime, undef, $who]);
return (1, @out);
}
return (1, @out);
}
diff --git
a/cmd/show/rcmd.pl
b/cmd/show/rcmd.pl
index 57cfe0969a8ce0274af19e550784f89ddbfe5ab3..64b64798ae0a6debafed70ad16e0b37784df88c4 100644
(file)
--- a/
cmd/show/rcmd.pl
+++ b/
cmd/show/rcmd.pl
@@
-33,7
+33,7
@@
while ($f = shift @f) { # next field
$to = 20 unless $to;
$from = 0 unless $from;
$to = 20 unless $to;
$from = 0 unless $from;
-@out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, 'rcmd', $who]);
+@out = $self->spawn_cmd(
"show/rcmd $cmdline",
\&DXLog::print, args => [$from, $to, $main::systime, 'rcmd', $who]);
#@out = DXLog::print($from, $to, $main::systime, 'rcmd', $who);
return (1, @out);
#@out = DXLog::print($from, $to, $main::systime, 'rcmd', $who);
return (1, @out);
diff --git
a/cmd/show/registered.pl
b/cmd/show/registered.pl
index 7e3ce45def2a5f6d8e14def1ec46dbf7f9333b17..0b41164caea7f5cf1c5514773252c7c6cca400fe 100644
(file)
--- a/
cmd/show/registered.pl
+++ b/
cmd/show/registered.pl
@@
-20,7
+20,7
@@
if ($line) {
$line = "^\U\Q$line";
}
$line = "^\U\Q$line";
}
-@out = $self->spawn_cmd(sub {
+@out = $self->spawn_cmd(
"show/registered $line",
sub {
my @out;
my @val;
my @out;
my @val;
diff --git
a/cmd/show/talk.pl
b/cmd/show/talk.pl
index 3dafbc0b2bfd67201ac5d1cde4903f7b5d04b6bd..942dac72dbeb015ceef56ab0b8e704a50413cf94 100644
(file)
--- a/
cmd/show/talk.pl
+++ b/
cmd/show/talk.pl
@@
-35,7
+35,7
@@
if ($self->priv < 6) {
return (1, $self->msg('e5')) if $who ne $self->call;
}
return (1, $self->msg('e5')) if $who ne $self->call;
}
-@out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, 'talk', $who]);
+@out = $self->spawn_cmd(
"show/talk $cmdline",
\&DXLog::print, args => [$from, $to, $main::systime, 'talk', $who]);
#@out = DXLog::print($from, $to, $main::systime, 'talk', $who);
return (1, @out);
#@out = DXLog::print($from, $to, $main::systime, 'talk', $who);
return (1, @out);
diff --git
a/cmd/show/vhfstats.pl
b/cmd/show/vhfstats.pl
index 402cc06d8014090f857277559abcaef115e0c342..b819ab7ca29fdfd212695f7ceeb539d377a59249 100644
(file)
--- a/
cmd/show/vhfstats.pl
+++ b/
cmd/show/vhfstats.pl
@@
-34,7
+34,7
@@
$now = Julian::Day->new($utime);
$now = $now->sub($days);
$date = cldate($utime);
$now = $now->sub($days);
$date = cldate($utime);
-@out = $self->spawn_cmd(sub {
+@out = $self->spawn_cmd(
"show/vhfstats $line",
sub {
my %list;
my @out;
my @in;
my %list;
my @out;
my @in;
diff --git
a/cmd/show/vhftable.pl
b/cmd/show/vhftable.pl
index a4a784918442b626046949196cc7914548ec5e8b..e7770e5c4c48286b96489b665d1682cd81e09bea 100644
(file)
--- a/
cmd/show/vhftable.pl
+++ b/
cmd/show/vhftable.pl
@@
-67,7
+67,7
@@
unless ($now) {
$date = cldate(time);
}
$date = cldate(time);
}
-@out = $self->spawn_cmd(sub {
+@out = $self->spawn_cmd(
"show/vhftable $line",
sub {
my %list;
my @out;
my $i;
my %list;
my @out;
my $i;
diff --git
a/cmd/show/wx.pl
b/cmd/show/wx.pl
index 81a81bf7d3b35131f546fc0a04f207c367c192bc..6b43268e89be34cc12c15ad1509dfa5f7dfda131 100644
(file)
--- a/
cmd/show/wx.pl
+++ b/
cmd/show/wx.pl
@@
-28,7
+28,7
@@
while ($f = shift @f) { # next field
$to = 20 unless $to;
$from = 0 unless $from;
$to = 20 unless $to;
$from = 0 unless $from;
-@out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, 'ann', 'WX']);
+@out = $self->spawn_cmd(
"show/wx $cmdline",
\&DXLog::print, args => [$from, $to, $main::systime, 'ann', 'WX']);
#@out = DXLog::print($from, $to, $main::systime, 'ann', $who);
return (1, @out);
#@out = DXLog::print($from, $to, $main::systime, 'ann', $who);
return (1, @out);
diff --git
a/perl/DXCommandmode.pm
b/perl/DXCommandmode.pm
index 14e0dd2c9b8e599a856ddbb76410755d1efa5d48..12ff175029ef10da39ed95116fea66ff13133adb 100644
(file)
--- a/
perl/DXCommandmode.pm
+++ b/
perl/DXCommandmode.pm
@@
-1256,16
+1256,15
@@
sub _diffms
{
return unless isdbg('chan');
my $call = shift;
{
return unless isdbg('chan');
my $call = shift;
- my $
a
= shift;
- my $
b = shift || [gettimeofday]
;
- my $
prefix = shift
;
+ my $
line
= shift;
+ my $
ta = shift
;
+ my $
tb = shift || [gettimeofday]
;
- my $secs = $b->[0] - $a->[0];
- my $msecs = int(($b->[1] - $a->[1]) / 1000);
+ my $a = int($ta->[0] * 1000) + int($ta->[1] / 1000);
+ my $b = int($tb->[0] * 1000) + int($tb->[1] / 1000);
+ my $msecs = $b - $a;
- my $s = "forkcall stats: $call ";
- $s .= "$prefix " if $prefix;
- $s .= "${secs}S" if $secs;
+ my $s = "forkcall stats: $call '$line' ";
$s .= "${msecs}mS";
dbg($s);
}
$s .= "${msecs}mS";
dbg($s);
}
@@
-1280,10
+1279,11
@@
sub _diffms
# IT DOES NOT START UP SOME NEW PROGRAM AND RELIES ON THE FACT THAT IT IS RUNNING DXSPIDER
# THE CURRENT CONTEXT!!
#
# IT DOES NOT START UP SOME NEW PROGRAM AND RELIES ON THE FACT THAT IT IS RUNNING DXSPIDER
# THE CURRENT CONTEXT!!
#
-# call: $self->spawn_cmd(\<function>, [cb => sub{...}], [prefix => "cmd> "], [progress => 0|1], [args => [...]]);
+# call: $self->spawn_cmd(
$original_cmd_line,
\<function>, [cb => sub{...}], [prefix => "cmd> "], [progress => 0|1], [args => [...]]);
sub spawn_cmd
{
my $self = shift;
sub spawn_cmd
{
my $self = shift;
+ my $line = shift;
my $cmdref = shift;
my $call = $self->{call};
my %args = @_;
my $cmdref = shift;
my $call = $self->{call};
my %args = @_;
@@
-1324,7
+1324,7
@@
sub spawn_cmd
$dxchan->send(@res);
}
}
$dxchan->send(@res);
}
}
- _diffms($call, $
t0, [gettimeofday], $prefix
);
+ _diffms($call, $
line, $t0
);
});
return @out;
});
return @out;