Article View: news.software.nntp
Article #12004Re: Characterizing feed latency
From: Joe Greco
Date: Wed, 30 Oct 1996 00:00
Date: Wed, 30 Oct 1996 00:00
90 lines
3334 bytes
3334 bytes
In article <carr-ya023180002910961850040001@news.svl.trw.com>,
John Carr <carr@svl.trw.com> wrote:
>I'm looking for a method to help characterize the delay in my newsfeed. Is
>anything available that produces some metric that reflects the delay from
>posting to receipt? Something like the median of the difference between
>the time of receipt & the time of posting seems reasonable.
You mean, like this?
(spool.jgreco.pts/0-2) 1:36pm ~ 2 > newsdelay
Minimum delay for last 300 articles: -11.791944444444444784 hours.
Average delay for last 300 articles: 12.08244999999999969 hours.
Maximum delay for last 300 articles: 166.58444444444444343 hours.
Average articles per second was 2.9411764705882355031
(spool.jgreco.pts/0-2) 1:37pm ~ 3 > more `which newsdelay`
#! /bin/sh -
count=300
if [ "0$1" -gt 0 ]; then
count="$1"
fi
# This will look at the last 300 articles that arrived at this site and
# find the average delay from the time when the articles were originally
# posted to the time they arrived at this site.
. /usr/local/news/innshellvars
tail -${count} $HISTORY\
| newsdelay.pl
# | tr '~' ' '\
# | awk '{s += $2 - $4} END\
# {print "Average delay for last "NR/1" articles: "s/NR/3600" hours."}' -
#
(spool.jgreco.pts/0-2) 1:37pm ~ 4 > more `which newsdelay.pl`
#! /usr/local/bin/perl
$, = ' '; # set output field separator
$\ = "\n"; # set output record separator
$MIN = 9999999999999999;
$SUM = 0;
$MAX = 0;
$COUNT = 0;
$ARMIN = 9999999999999999;
$ARMAX = 0;
while (<>) {
tr/~/ /;
($Fld1,$Fld2,$Fld3,$Fld4) = split(' ', $_, 9999);
$DELAY = $Fld2 - $Fld4;
$SUM += $DELAY;
if ( $DELAY < $MIN ) {
$MIN = $DELAY;
}
if ( $DELAY > $MAX ) {
$MAX = $DELAY;
}
if ( $ARMIN > $Fld2 ) {
$ARMIN = $Fld2;
}
if ( $ARMAX < $Fld2 ) {
$ARMAX = $Fld2;
}
$COUNT += 1;
}
print 'Minimum delay for last ' . $COUNT / 1 . ' articles: ' . $MIN / 3600 . '
hours.';
print 'Average delay for last ' . $COUNT / 1 . ' articles: ' . $SUM / $COUNT / 3
600 . ' hours.';
print 'Maximum delay for last ' . $COUNT / 1 . ' articles: ' . $MAX / 3600 . '
hours.';
$PERIOD = $ARMAX - $ARMIN;
print 'Average articles per second was ' . $COUNT / $PERIOD;
(spool.jgreco.pts/0-2) 1:45pm ~ 5 >
My apologies to the author of the original idea. This has been through
several iterations here. I find it very useful, particularly the
"average articles per second" number, which is a server health indication.
... JG
Technical Details
Message-ID:
<558bed$l1v@earth.alpha.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<carr-ya023180002910961850040001@news.svl.trw.com>Show Full Headers
Complete Article Headers
Message-ID: <558bed$l1v@earth.alpha.net> Subject: Re: Characterizing feed latency Date: Wed, 30 Oct 1996 00:00:00 +0000 From: jgreco@ns.sol.net (Joe Greco) References: <carr-ya023180002910961850040001@news.svl.trw.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 193253115 Distribution: inet Sender: joegreco@earth.execpc.com Organization: sol.net Network Services - Milwaukee, WI Newsgroups: news.software.nntp