You are not logged in.

#1 2024-05-25 02:32:41

zoltan
Member
Registered: 2023-05-03
Posts: 24

Reflector sorting

I just have a simple question about configuring my reflector.conf file.  Is it possible to have Reflector sort by multiple parameters simultaneously?  In particular, I would like it to sort by age first, then by rate.  If I set --sort to say

--sort 'age,rate'

will this do what I want? 

If so, what is the correct syntax?  The man page shows braces, but I'm not sure if those are just placeholders used in the man page to show all of the possible options, or if they are used as delimiters in the actual configuration file to contain all of the options that can be placed within the braces.  Should I use braces, single quotes, or can I just use comma-separated values in the configuration file, and can I use more than one sort option at the same time?

Thanks in advance for the help.

Offline

#2 2024-05-25 05:08:20

Retr0r0cket
Member
From: Sol III
Registered: 2021-11-24
Posts: 27

Re: Reflector sorting

Even if it's possible (which I don't think it is), it's not practical. Mirrors will always have age differences meaning that the rate comparison would never occur even with microsecond age differences (they're more in real life, but theoretically).

Offline

#3 2024-05-25 11:14:54

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,459
Website

Re: Reflector sorting

You can do this with speculum, which you can find in the AUR. It was one if the reasons I developed it.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#4 2024-05-26 20:17:11

zoltan
Member
Registered: 2023-05-03
Posts: 24

Re: Reflector sorting

Retr0r0cket wrote:

Even if it's possible (which I don't think it is), it's not practical. Mirrors will always have age differences meaning that the rate comparison would never occur even with microsecond age differences (they're more in real life, but theoretically).

I was hoping perhaps it would sort them by age first to give me the most recently updated mirrors, then from those mirrors select the ones with the fastest download rates.  But if this isn't possible, I'll just have it sort by age.  I'd rather have the newest mirrors than save a couple of seconds on downloads.

Offline

#5 2024-05-26 20:18:15

zoltan
Member
Registered: 2023-05-03
Posts: 24

Re: Reflector sorting

schard wrote:

You can do this with speculum, which you can find in the AUR. It was one if the reasons I developed it.

I'll check it out and see how it works.  If I like it, I'll give it a vote.  Thanks for the recommendation!

Offline

#6 2024-05-26 20:56:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,432
Website

Re: Reflector sorting

zoltan wrote:

I was hoping perhaps it would sort them by age first to give me the most recently updated mirrors, then from those mirrors...

Sorting doesn't restrict the set of mirrors in any way - it only sorts them!  If you sort by age, then sort again by rate, you'll have completely undone the age sorting.

When you say you want only the "most recently" updated mirrors, how recent is recent enough?  Or how many most recent?  Sorting can't give you this subset, filtering does.  So you filter for age then only sort by rate.

Last edited by Trilby (2024-05-26 21:06:50)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB