Menu

wcgmembercmp

Adri Verhoef
Attachments
Rankings.png (19241 bytes)

wcgmembercmp

It generates a URL

This program is used only to generate a URL that you can use in a browser to view and/or compare member or team statistics (on World Community Grid). When feeding this URL to a browser, its main use is to view the context of the ranking, i.e. a certain number of preceding and succeeding entries.

Statistics in context

After configuring wcgmembercmp, see [Configuration], having specified the name of your account on World Community Grid (and if you joined a team, your teamname), you will be able to view your own personal statistical data (and those of other members in context, if possible), such as Total Runtime + Ranking, Generated Points + Ranking, Returned Results + Ranking.

World Community Grid offers a way to compare member as well as team statistics upto a maximum of 8 names that you specify. With wcgmembercmp you will only need to specify 1 name. What's more, if you configure that name to be used by wcgmembercmp, there's no need to specify that name anymore.

Default

By default, wcgmembercmp will look up the configured membername. It will do this on page 1 of the all-time rankings by Total Runtime and it will generate a context of 1 trailing entry and 6 preceding entries. (The consulted webpage is in fact https://www.worldcommunitygrid.org/stat/viewStatsByMemberAT.do?sort=cpu&pageNum=1&numRecordsPerPage=250 in this case.)

Where 'membername' is used in the text below, depending on the context it may also apply to 'teamname'.

These statistics are limited to a maximum of 5000 entries, so if the configured membername is at rank 5000, you won't be able to view the following entry (at rank 5001).

Pagenumber and pagelength

Since wcgmembercmp will only look up one page per session, it is possible that the name cannot be found on that page and that means you will not receive a URL. So if the name is on a different pagenumber (i.e. not on page 1), you will have to specify that other pagenumber. This also means that if you don't know the pagenumber yet, you will have to find out which pagenumber beforehand. Also note that for most members it is likely that the pagenumber of your Total Runtime is on a different page than your Returned Results or Generated Points.
World Community Grid offers two different URLs to view member statistics as well as team statistics:

The number of entries on a page — we call this the pagelength — is limited to a maximum of 250 entries and wcgmembercmp also uses this limit. One effect of this limitation is that wcgmembercmp will not look across that boundary. So if the membername is near a boundary, wcgmembercmp may not be able to supply the data from all surrounding entries (i.e. the context). However, if you know that this is the case and want all available context from wcgmembercmp, you can specify to use a different number of entries on a page (i.e. use a different pagelength).
Example: if the membername is ranked at 4752, then (by default) you will see a context of 1 trailing entry at 4753 and only one preceding entry (at 4751) instead of 6, because entry 4750 is on the preceding page. To overcome this, you could specify a different 'pagelength', e.g. by subtracting 8 from pagelength 250 and adding 1 to the pagenumber. (Since there are 20 pages of 250 entries, there are 21 pages if you specify a pagelength of 242.)

The quickest way to find out which page to use is to go to the designated statistics page (for Member statistics or for Team statistics) mentioned above.
On the Member statistics page, click the link 'Multiple member comparison'; on the Team statistics page, click the link 'Multiple member comparison'. Then fill out either the desired membername or teamname (depending on your choice of Member statistics or Team statistics) in one of the 8 text entry fields and click the 'Compare' button next to the 8 inputfields. The resulting page will show the needed rank. Example:

Rankings
Fig. 1: Rankings
In the example above, the rank by 'Total run time' is "#2,837", the rank by 'Points generated' is "#4,702" and the rank by 'Results returned' is "#4,362".

To compute the needed pagenumber for wcgmembercmp, using a pagelength of 250, divide that rank by 250 and add 1. (Dividing by 250? It may be easier to divide the rank by 1000 (one thousand), then multiply it by 4 (or double its double value), and finally add 1.) E.g. using the route of dividing the rank by 1000 etc., if you notice that your rank is 4752, then dividing by 1000 yields 4.752; its double value is 9.504; doubling that yields 19.008. Adding 1 yields 19 + 1 = 20. So your entry can be found on page 20 (using a pagelength of 250).

Usage

Apart from the options that are available to wcgmembercmp, there is a maximum of three arguments that you can specify. These are symbolically named sortby, pagenum and entries and they must be used in that order. There are four ways to use these arguments:

  • specifying none of these three means that the defaults for sortby, pagenum and entries will apply;
  • specifying only sortby means that the defaults for pagenum and entries will apply;
  • specifying only sortby and pagenum means that the default for entries will apply;
  • specifying sortby, pagenum and entries means that no defaults will apply.

Explanation of the arguments

sortby

This argument can have three values: t, p and r.

  • t stands for Total Runtime and means that the statistics for Total Runtime should be used;
  • p stands for Generated Points and means that the statistics for Generated Points should be used;
  • r stands for Returned Results and means that the statistics for Returned Results should be used.

Example: wcgmembercmp r will generate a URL for a configured membername on page 1 of the Returned Results. If the name is not on page 1, wcgmembercmp will report that the membername could not be found.

pagenum

This argument determines the pagenumber where to look for the membername.
Example: wcgmembercmp r 20 will generate a URL for a configured membername on page 20 of the Returned Results. If the name is not on page 20, wcgmembercmp will report that the membername could not be found. Note that the default pagelength for wcgmembercmp is 250.

entries

This argument determines the pagelength, i.e. the number of entries on a page to use.
Example: wcgmembercmp r 21 242 will generate a URL for a configured membername on page 21 of the Returned Results, using a pagelength of 242 (i.e. 242 entries on a page, instead of the default 250). If the name is not on that page, wcgmembercmp will report that the membername could not be found.

Options

Option -A

This option takes one argument that determines how many entries should follow after the matching membername. By default, only one entry will follow the matching membername (and 6 entries will precede it). Since there is a maximum of 8 entries to show and the minimum amount of ensuing entries to show is 0, the maximum value is 7.
Example: wcgmembercmp -A 6 r 21 242 will generate a URL for a configured membername on page 21 of the Returned Results, using a pagelength of 242, with 6 names following after the matching membername (instead of 6 preceding names).

Option -c

This option takes one argument that says which twolettercode for a country to use, instead of comparing membernames worldwide.
In this case, World Community Grid offers two other URLs to view member statistics as well as team statistics:

This also means that the pagenumber might differ from the case where option -c is not used.

Option -f

This option only applies to team statistics and takes one argument that determines which filter should be used. There are 8 possible values for the argument. The default is to apply no filter at all. See the output of wcgmembercmp -h for the possible values.

Option -h

This is the help option. It shows which options are available (with concise explanations) and how to use them.

Option -t

This option takes one argument that determines which teamname to use (instead of the configured teamname). The program will assume that you want to compare teams.

Option -T

Without specifying option -t, this will generate a URL to compare teams (for the configured teamname).

Option -u

This option takes one argument that determines which membername to use (instead of the configured membername). See also option -t for teamnames.

Option -U

This option lets you update the program. The argument specifies the file that is the new version. In this way your configuration inside the program itself will be kept intact.

Option -V

This option shows the version of the program.

Option -y

This option says to use statistics for yesterday, instead of all-time statistics.
In this case, World Community Grid offers two other URLs to view member statistics as well as team statistics:

If option -y is used in combination with option -c, World Community Grid offers another set of URLs to view member statistics as well as team statistics:

In both cases, this also means that the pagenumber might differ from the case where option -y is not used.

Notes

Failures

There are various circumstances where a lookup may fail. E.g.:

  • you can configure/specify at most only one membername;
  • when the statistics are being updated;
  • when a name contains an ampersand;
  • when a name contains two or more successive spaces;
  • when the command "links -force-html -dump -width 140 …" doesn't do what it's supposed to do;
  • when the output isn't recognized by the program (e.g. because of a change in the headertext).

Anonymous members

Anonymous members with a membername that is shown as Anonymous will not be taken into consideration. They will not end up in the URL.


Related

Wiki: Configuration

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.