Update of /cvsroot/poe/poe/lib/POE/Resource
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16995/lib/POE/Resource
Modified Files:
Sessions.pm Statistics.pm
Log Message:
Remove tabs from source code. People (myself included) have been
introducing them with edits and patches.
Index: Sessions.pm
===================================================================
RCS file: /cvsroot/poe/poe/lib/POE/Resource/Sessions.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Sessions.pm 12 Apr 2005 23:02:12 -0000 1.19
--- Sessions.pm 22 Apr 2005 20:36:31 -0000 1.20
***************
*** 504,508 ****
# Stop the main loop if everything is gone.
! # XXX - Under Tk this is called twice. Why? WHY is it called twice?
unless (keys %kr_sessions) {
$self->loop_halt();
--- 504,508 ----
# Stop the main loop if everything is gone.
! # XXX - Under Tk this is called twice. Why? WHY is it called twice?
unless (keys %kr_sessions) {
$self->loop_halt();
Index: Statistics.pm
===================================================================
RCS file: /cvsroot/poe/poe/lib/POE/Resource/Statistics.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Statistics.pm 16 Nov 2004 07:54:11 -0000 1.3
--- Statistics.pm 22 Apr 2005 20:36:31 -0000 1.4
***************
*** 104,108 ****
$_stat_wpos = ($_stat_wpos+1) % $_stat_window_size;
if ($_stat_wpos == $_stat_rpos) {
! $_stat_rpos = ($_stat_rpos+1) % $_stat_window_size;
}
--- 104,108 ----
$_stat_wpos = ($_stat_wpos+1) % $_stat_window_size;
if ($_stat_wpos == $_stat_rpos) {
! $_stat_rpos = ($_stat_rpos+1) % $_stat_window_size;
}
***************
*** 111,128 ****
my $epoch = 0;
while ($count < $_stat_window_size && $_stat_metrics->[$pos]->{epoch}) {
! $epoch = $_stat_metrics->[$pos]->{epoch} unless $epoch;
! while (my ($k,$v) = each %{$_stat_metrics->[$pos]}) {
! next if $k eq 'epoch';
! $average{$k} += $v;
! }
! $count++;
! $pos = ($pos+1) % $_stat_window_size;
}
if ($count) {
my $now = time();
! map { $average{"avg_$_"} = $average{$_} / $count } keys %average;
! $average{total_duration} = $now - $epoch;
! $average{interval} = ($now - $epoch) / $count;
}
--- 111,128 ----
my $epoch = 0;
while ($count < $_stat_window_size && $_stat_metrics->[$pos]->{epoch}) {
! $epoch = $_stat_metrics->[$pos]->{epoch} unless $epoch;
! while (my ($k,$v) = each %{$_stat_metrics->[$pos]}) {
! next if $k eq 'epoch';
! $average{$k} += $v;
! }
! $count++;
! $pos = ($pos+1) % $_stat_window_size;
}
if ($count) {
my $now = time();
! map { $average{"avg_$_"} = $average{$_} / $count } keys %average;
! $average{total_duration} = $now - $epoch;
! $average{interval} = ($now - $epoch) / $count;
}
|