Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect timing on the stats page #6441

Closed
eatyourgreens opened this issue Nov 5, 2024 · 7 comments
Closed

Incorrect timing on the stats page #6441

eatyourgreens opened this issue Nov 5, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Nov 5, 2024

Package

  • lib-user

Describe the bug

A weird glitch on the stats page today. I spent about 10 minutes on Squirrel Mapper, and I’ve been credited with almost 4 hours.

Daily stats showing 225 minutes for today.

To Reproduce

I’m seeing this on my personal stats for this week.

https://www.zooniverse.org/users/eatyourgreens/stats?start_date=2024-10-30

Expected behavior

Today’s count should show 10 minutes, maybe less.

@eatyourgreens eatyourgreens added the bug Something isn't working label Nov 5, 2024
@goplayoutside3
Copy link
Contributor

The hours displayed in the personal stats page are calculated based on the start and end times of your classification efforts. For all classifications 2015 and beyond, the calculation for time spent on each classification is a straightforward subtraction: finished_at - started_at. We then add up all these values to get the number of hours you've spent classifying.

In some cases, volunteers leave browser tabs open on a project's classify page. This means a classification's "started at" is recorded, but the "finished at" might be recorded at a much later time once the volunteer returns to that tab. We try our best to take care of idle sessions by having a session cap in place.

I'm closing this because idle sessions is the likely cause. Your classification count for Squirrel Mapper today (19 classifications) is correct. In the future if you have questions about how stats hours are recorded, please ask via [email protected] so a backend member can do a deep dive into your user account data.

@eatyourgreens
Copy link
Contributor Author

I did one session today, in one tab. Usually I classify on my phone, so idle tabs shouldn’t be an issue.

Maybe a failed classification got stuck in local storage? 🤷🏻‍♂️

@goplayoutside3
Copy link
Contributor

A failed classification in local storage is also a possibility, but my response about using [email protected] to get in touch with a backend dev with questions about specific classification data is the best way to deep dive if you want to. This Issue will stay closed and unmonitored as it's too vague to be iterated on for actionable solutions.

@eatyourgreens
Copy link
Contributor Author

That’s okay, I can pull my classifications from the API and take a look. Just thought you might like to know that the time spent sometimes has weird errors.

@eatyourgreens
Copy link
Contributor Author

I looked back through my classifications on my admin page (https://local.zooniverse.org:3735/admin/users/149?env=production) and classification 596255757 was started at 12:46:12 but finished at 17:32:48, which is the time that the classification was saved to Panoptes. There's a bunch of classifications that were submitted in between, around about 13:30, each taking roughly 30 seconds or so.

It looks like there's a bug in the FEM classifier. classification.metadata.finished_at is supposed to be set when the Done button is pressed, not when the classification is saved to Panoptes. For this classification, that would have been some time around 12:47:00. If I figure out where that bug is in the code, I'll open an issue, but heads up that classification.metadata.finished_at isn't always recording the time a classification was finished. I think it might be recording the time that the classification was saved, which can be very different.

A classification from Squirrel Mapper, displayed on my admin page. It's recorded as having taken 4 hours and 45 minutes. Other cl;assifications at that time took about 45 seconds.

@eatyourgreens
Copy link
Contributor Author

I was wrong. I started that classification at around 17:32:00 and finished it at 17:32:48. The bug is in classification.metadata.started_at, not classification.metadata.finished_at.

@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Nov 7, 2024

Moved this into #6447, with tests that reproduce the bug, and a fix, in #6449.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants