wiki:CreditStats

Credit statistics web sites and services

Statistics data describes the credit granted to hosts, participants and teams by the various BOINC projects. This can be used for various purposes, such as:

  • Web sites that show statistics and leaderboards for one or more BOINC projects. Examples are available on the list of stats sites.
  • Dynamically-generated images (typically used as message-board signatures) that show user and/or team credit, possible across projects. Examples are listed here.
  • Displays of current credit on cell phones and PDAs.

Displays that use colors to distinguish BOINC projects should use these colors.

BOINC provides a flexible architecture for distributing statistics data, with the goal of enabling new display applications.


The BOINC statistics data architecture
The BOINC statistics data architecture


Getting data from projects

Each BOINC project provides data in two forms:

  • As a set of downloadable files (in a compressed XML format) that contain the project's complete current statistics. These files are typically updated once every 24 hours.
  • As a set of Web RPCs that return an XML-format description of a given participant's credit, based on that participant's database ID.

Applications should access these data sources as infrequently as possible, to avoid imposing unnecessary load on project servers. For example, a Web RPCs to get a particular participant's data should made at most once per hour.

Aggregate data

A data aggregator is a service that collects XML files from several projects, and computes the totals for participants and hosts (based on cross-project IDs?) across these projects. This aggregate data is then exported in two ways:

Application developers are encouraged to concentrate on aggregate rather than per-project data. This will encourage participants to join multiple projects.

Code examples

Developing a system that collects, analyzes, and stores credit data from all BOINC projects is a large development task. The code for BOINC Combined Stats, a web site/service that provides per-project and aggregate data, can be downloaded via git using

git clone git://boinc.berkeley.edu/boinc-combined-stats.git
or
git clone http://boinc.berkeley.edu/git/boinc-combined-stats.git

Computing the current value of Recent Average Credit

BOINC updates 'recent average credit' (RAC) only when new credit is granted. Interfaces that export RAC also export that time at which it was last updated. To obtain the current value of RAC, you must 'decay' it based on the time that has elapsed since it was updated:

function decay_average($avg, $avg_time, $now = 0) {
   $M_LN2 = 0.693147180559945309417;
   $credit_half_life = 86400 * 7;
   if ($now == 0) {
       $now = time();
   }
   $diff = $now - $avg_time;
   $weight = exp(-$diff * $M_LN2/$credit_half_life);
   $avg *= $weight;
   return $avg;
}

If you don't apply this decay, inactive entities will have incorrectly high RAC.

PHP code for the decay function can be found in html/inc/credit.inc and html/inc/host.inc.

Last modified 3 years ago Last modified on 06/08/14 22:13:58

Attachments (1)

Download all attachments as: .zip