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

Reworked SiteMonthlyMetrics registered users metric #268

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

johnbaldwin
Copy link
Contributor

  • now use collected total user counts in
    SiteDailyMetrics.total_user_count for the registered users
  • This saves expensive database queries
  • This is more accurate because it preserves historical data. The
    previous approach captured live data for users for a site and users can
    be removed from sites
  • Very rudimentary test coverage added

What can be improved:

This does not report on users who have enrolled
for the current day. We want to avoide querying the Django 'User' model
for 'date_joined' because the field is not indexed

Test coverage can be improved. This commit just includes very basic
coverage

*  now use collected total user counts in
SiteDailyMetrics.total_user_count for the registered users
* This saves expensive database queries
* This is more accurate because it preserves historical data. The
previous approach captured live data for users for a site and users can
be removed from sites
* Very rudimentary test coverage added

What can be improved:

This does not report on users who have enrolled
for the current day. We want to avoide querying the Django 'User' model
for 'date_joined' because the field is not indexed

Test coverage can be improved. This commit just includes very basic
coverage
@johnbaldwin johnbaldwin force-pushed the john/smm-registered-users-fix branch from 1d1f518 to 01e5fef Compare October 14, 2020 20:25
@johnbaldwin johnbaldwin merged commit be6428a into master Oct 15, 2020
@johnbaldwin johnbaldwin deleted the john/smm-registered-users-fix branch October 15, 2020 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants