Page 1 of 1

the WU stats page

Posted: Fri Apr 10, 2020 12:22 pm
by Knish
This will be extremely low priority so please don't bother the scientists or staff; just filed away here as something to do later.

on the apps.foldingathome.org/wu page, after a result shows, there's an extra "Message" at the bottom. The timestamps written there are inconsistent with the ones that show up in the results table.

I suspect that the times are getting converted to GMT twice when they get written at the bottom...
(excerpts of web site code that I think are pertinent)

Code: Select all

ts: new Date().toUTCString()

Hi {{wu.user}} (team {{wu.team}}), Your WU (P{{query.project}}
            R{{query.run}} C{{query.clone}} G{{query.gen}}) was added to the
            stats database on {{wu.log_time | ts}} for {{wu.credit}} points 
because the times in the table are already in GMT just like they are in the client logs.

Code: Select all

<table class="results">
            <tr>
              <th>User</th>
              <th>Team</th>
              <th>CPUID</th>
              <th>Credit</th>
              <th>Assigned</th>
              <th>Returned</th>
              <th>Credited</th>
              <th>Days</th>
              <th>Code</th>
            </tr>
            <tr v-for="wu in wus">
              <td><a target="_blank" :href="'cpu?q=' + wu.user">{{wu.user}}</a></td>
              <td><a target="_blank" :href="'https://stats.foldingathome.org/team/' + wu.team">{{wu.team}}</a></td>
              <td>{{wu.cpuid}}</td>
              <td>{{wu.credit.toLocaleString()}}</td>
              <td>{{wu.assign_time}}</td>
              <td>{{wu.credit_time}}</td>
              <td>{{wu.log_time}}</td>
              <td>{{wu.days.toLocaleString()}}</td>
              <td>{{wu.code}}</td>
            </tr>
          </table> 
or perhaps it's just me in that my browsers are doing something incorrectly?


One more question regarding the results table: I find it odd that we get the "Credited" timestamp before the WU is "Returned"
"Credited" matches perfectly with the time of 'Final credit estimate: xxx points' from the logs, but in the web site's source code "Returned" and "Credited" are represented by wu.credit_time and wu.log_time, respectively, which to me looks reversed? Anybody know the process behind the scenes in how the WUs are received and credited? If not, no biggie. I wish not to bother the staff.

Re: the WU stats page

Posted: Fri Apr 10, 2020 12:34 pm
by PantherX
Knish wrote:...Anybody know the process behind the scenes in how the WUs are received and credited? If not, no biggie. I wish not to bother the staff.
Here's the overview of what happens:
FAHClient provides some system configuration and asks the Assignment Server for a new WU to fold
Assignment Server looks at system configuration and Work Server choices. Does a best match and informs the FAHClient of which Work Server to connect to
FAHClient attempts to connect to said Work Server
Work Server acknowledges the connection attempt
FAHClient starts downloading the new WU (Time A)
Completed WU attempts to connect to the Work Server*
Work Server acknowledges the connection attempt
Completed WU is successfully transferred to the Work Server
Work Server verifies that the completed WU is valid (Time B)
Work Server credits the WU based upon the time duration between Time A and Time B

*If the WU fails to connect to the Work Server, it will attempt to connect to the Collection Server(s) if any are configured (as these are optional) and once the completed WU is verified, it will be award credits.

If they are delays in uploading the completed WU, then your credits will be reducing.

Do note that if instead of the completed WU being uploaded to the Work Server, it can be uploaded to a Collection Server and that would be Time B instead.

Re: the WU stats page

Posted: Fri Apr 10, 2020 8:45 pm
by Knish
Thanks for the explanation! I'm still a bit lost b/c my reference point was from the server side perspective of the WU stats page, where "Received" and "Credited" are displayed in a table. I think from your explanation that the time at Time B becomes wu.log_time and this shows up under the "Credited" column. Seems only obvious that Time A is wu.assign_time, but that leaves wu.credit_time i'm pretty foggy about where that comes from for the "Received" column. It tends to frequently be about 6-10 minutes after Time B which is more puzzling for me.

Re: the WU stats page

Posted: Fri Apr 10, 2020 9:26 pm
by PantherX
Humm... I am aware that the WU credits are stored on the Work Server, not the Stats system. However, the Stats system collects all the WU credits from the Work Server and then processes it. My guess is that wu.credit_time is the time when the Stats system goes out to all the Work Servers and collects the WU credits to then process it.

Re: the WU stats page

Posted: Fri Apr 10, 2020 9:44 pm
by Frogging101
Amusingly, the text in the "Messages" section at the bottom also changes on the fly when you modify the Project/Run/Clone/Gen input fields at the top. It's a purely cosmetic bug, but I found it funny :P.