ALT Linux Bugzilla
– Attachment 5184 Details for
Bug 26547
[FR] mirror speed test
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
repotest.pl
repotest (text/plain), 2.66 KB, created by
Michael Shigorin
on 2011-11-02 12:23:12 MSK
(
hide
)
Description:
repotest.pl
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2011-11-02 12:23:12 MSK
Size:
2.66 KB
patch
obsolete
>#!/usr/bin/perl >use strict; >use warnings; >use Time::HiRes qw(gettimeofday); >use LWP::UserAgent; >my $testfile = "pclinuxos/2007/base/srclist.main.bz2"; >my @timedList = (); >my @badList = (); >my @reposList = ( > "http://ftp.riken.go.jp/pub/Linux/pclinuxos/apt/", > "http://ftp.kddlabs.co.jp/Linux/packages/pclinuxos/apt/", > "http://ftp.jaist.ac.jp/pub/Linux/PCLinuxOS/apt/", > "http://mirror.pclinuxclub.com/pclinuxos/apt/", > "http://www2.mirror.in.th./osarchive/pclinuxos/pclinuxos/apt/", > "http://ftp.twaren.net/Linux/PCLinuxOS/apt/", > "http://gnupg.cdpa.nsysu.edu.tw/Linux/PCLinuxOS/apt/", > "http://mirror.internode.on.net/pub/pclinuxos/apt/", > "ftp://mirror.aarnet.edu.au/pub/pclinuxos/apt/", > "http://na.mirror.garr.it/mirrors/pclinuxos/apt/", > "http://ftp.ch.debian.org/mirror/pclinuxos/apt/", > "http://gnustep.ethz.ch/mirror/pclinuxos/apt/", > "http://debian.ethz.ch/mirror/pclinuxos/apt/", > "ftp://ftp.pbone.net/pub/pclinuxos/apt/", > "http://ftp.klid.dk/ftp/pclinuxos/apt/", > "http://mirrors.lastdot.org:1280/pclos/apt/", > "http://mirrors.xservers.ro/pclinuxos/apt/", > "http://ftp.heanet.ie/pub/pclinuxos/apt/", > "http://ftp.belnet.be/mirror/pclinuxonline.com/apt/", > "http://ftp.nl.freebsd.org/os/Linux/distr/texstar/pclinuxos/apt/", > "http://ftp.sh.cvut.cz/MIRRORS/pclinuxos/apt/", > "ftp://cesium.di.uminho.pt/pub/pclinuxos/apt/", > "http://distrib-coffee.ipsl.jussieu.fr/pub/linux/pclinuxos/apt/", > "http://ftp.cc.uoc.gr/mirrors/linux/pclinuxos/apt/", > "http://ftp.leg.uct.ac.za/pub/linux/pclinuxos/apt/", > "http://spout.ussg.indiana.edu/linux/pclinuxos/pclinuxos/apt/", > "http://ftp.uwsg.indiana.edu/linux/pclinuxos/pclinuxos/apt/", > "http://ftp.ussg.iu.edu/linux/pclinuxos/pclinuxos/apt/", > "http://pclosusers.com/pclosfiles/", > "http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/" >); >print "Downloading srclist.main.bz2 from each mirror...\n"; >foreach my $url (@reposList) { > my $link = "$url$testfile"; > my $ua = LWP::UserAgent->new(); > $ua->timeout(3); > $ua->show_progress('TRUE'); > my $t0 = gettimeofday(); > my $response = $ua->get($link); > my $t1 = gettimeofday(); > $url =~ s|(\w+://.*?)(:\d+)?/(.*)|$1|; > if ($response->is_success) { > my $delta = ($t1 - $t0); > my $line = $url.' '.$delta; > push(@timedList, $line); > } else { > push(@badList, $url); > } >} >my @sortedList = >map { $_->[0] } >sort { $a->[1] <=> $b->[1] } >map { [$_, (split)[1] ] } @timedList; >print "\nMirrors speed (time to get 400 KB):\n"; >foreach (@sortedList) { > print "$_", "s\n"; >} >if (@badList) { > print "\nThe following mirrors timed out or are not valid :\n"; > foreach (@badList) { > print "$_", "\n"; > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 26547
: 5184