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

Track when the verify button is pressed + robustness fixes #770

Merged

Conversation

shankari
Copy link
Contributor

@shankari shankari commented Aug 5, 2021

  • Add the ClientStats module to infinite scroll
  • Add a new kind of client stat
  • Mark the stat when the button is pressed

Testing done:

  • Hacked the code to ensure that verifiability is always set to "can-verify"
  • Verified the trip
  • "End trip and force sync"
  • Confirmed that the value was pushed
2021-08-04 15:37:25,004:DEBUG:123145498861568:Updated result for user = 113aef67-400e-4e21-a29f-d04e50fc42ea, key = stats/client_nav_event, write_ts = 1628116460.869 = {'n': 1, 'nModified': 0, 'upserted': ObjectId('610b16a53906cf6a2964f11b'), 'ok': 1.0, 'updatedExisting': False}
2021-08-04 15:37:25,005:DEBUG:123145498861568:Updated result for user = 113aef67-400e-4e21-a29f-d04e50fc42ea, key = stats/client_nav_event, write_ts = 1628116560.485 = {'n': 1, 'nModified': 0, 'upserted': ObjectId('610b16a53906cf6a2964f11d'), 'ok': 1.0, 'updatedExisting': False}
2021-08-04 15:37:25,007:DEBUG:123145498861568:Updated result for user = 113aef67-400e-4e21-a29f-d04e50fc42ea, key = stats/client_time, write_ts = 1628116588.745 = {'n': 1, 'nModified': 0, 'upserted': ObjectId('610b16a53906cf6a2964f11f'), 'ok': 1.0, 'updatedExisting': False}
  • Confirmed that the value was in the usercache at the end
edb.get_usercache_db().find({"metadata.key": "stats/client_nav_event"}).distinct("data.name")
['app_launched',
 'checked_diary',
 'checked_inf_scroll',
 'expanded_trip',
 'notification_open',
 'opened_app',
 'sync_launched',
 'verify_trip']
  • two robustness fixes where we check for the inferred labels and the
    expectation before using them. These should not occur but it is good to avoid
    crashing if they do!

- Add the ClientStats module to infinite scroll
- Add a new kind of client stat
- Mark the stat when the button is pressed

Testing done:
- Hacked the code to ensure that verifiability is always set to "can-verify"
- Verified the trip
- "End trip and force sync"
- Confirmed that the value was pushed
```
2021-08-04 15:37:25,004:DEBUG:123145498861568:Updated result for user = 113aef67-400e-4e21-a29f-d04e50fc42ea, key = stats/client_nav_event, write_ts = 1628116460.869 = {'n': 1, 'nModified': 0, 'upserted': ObjectId('610b16a53906cf6a2964f11b'), 'ok': 1.0, 'updatedExisting': False}
2021-08-04 15:37:25,005:DEBUG:123145498861568:Updated result for user = 113aef67-400e-4e21-a29f-d04e50fc42ea, key = stats/client_nav_event, write_ts = 1628116560.485 = {'n': 1, 'nModified': 0, 'upserted': ObjectId('610b16a53906cf6a2964f11d'), 'ok': 1.0, 'updatedExisting': False}
2021-08-04 15:37:25,007:DEBUG:123145498861568:Updated result for user = 113aef67-400e-4e21-a29f-d04e50fc42ea, key = stats/client_time, write_ts = 1628116588.745 = {'n': 1, 'nModified': 0, 'upserted': ObjectId('610b16a53906cf6a2964f11f'), 'ok': 1.0, 'updatedExisting': False}
```
- Confirmed that the value was in the usercache at the end

```
edb.get_usercache_db().find({"metadata.key": "stats/client_nav_event"}).distinct("data.name")
['app_launched',
 'checked_diary',
 'checked_inf_scroll',
 'expanded_trip',
 'notification_open',
 'opened_app',
 'sync_launched',
 'verify_trip']
```

+ two robustness fixes where we check for the inferred labels and the
expectation before using them. These should not occur but it is good to avoid
crashing if they do!
Copy link
Contributor

@GabrielKS GabrielKS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@shankari shankari merged commit 595f4d5 into e-mission:ceo_ebike_project_stage Aug 5, 2021
GabrielKS pushed a commit to GabrielKS/e-mission-phone that referenced this pull request Aug 19, 2021
Track when the verify button is pressed + robustness fixes
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