RoboTutorLLC / RTFace_Login

1 stars 1 forks source link

FEATURE REQUEST: log state changes in RTFaceLogin #23

Open JackMostow opened 2 years ago

JackMostow commented 2 years ago

Log state transitions to help diagnose future bugs (if any ;-) and understand behavior in RTFaceLogin, e.g.:

  1. How long does it take to enroll?
  2. How often does enrollment succeed, i.e. add new user?
  3. How often does login succeed, i.e. lead to launching RoboTutor?
  4. How often do kids record "recreational selfies"?
  5. How often do kids look at animals for fun (i.e. not just to confirm identity)?
  6. How long does it take to login?
  7. Where does the time go, i.e. how much average and total time is spent in each state?
JackMostow commented 1 year ago

If easy, log whether playback or recording is active. E.g. playback shouldn't be ongoing when launch RoboTutor. (see #27)

JackMostow commented 1 year ago

Madelein wisely suggested including current state when log stack trace. Let it be done ;-).

JackMostow commented 1 year ago

@madeleinvillegas - The key state variable is _audioPlaying, which specifies which prompt is playing, and dispatches the central switch (_audioPlaying) case statement in onCompletion at app/src/main/java/com/example/iris/login1/GalleryActivity.java line 498. So logging the value of _audioPlaying at line 498 will describe the current state at that point. _audioPlaying has type STATE, an enumerated type defined in app/src/main/java/com/example/iris/login1/Common.java lines 14ff: public enum STATE { IF_YOU_SEE_YOUR_PICTURE, PLEASE_TAP_ON_YOUR_PICTURE, TO_SEE_MORE_PICTURES, ... I think toString(_audioPlaying) should return this state name so you can log it intelligibly. Thanks! - Jack

JackMostow commented 1 year ago

Use same timestamp format YYYYMMDD_HHMMSS.mmm for filename as for event.
@Jiayan -- Will . in a filename cause your log analysis code any problems?

JackMostow commented 1 year ago

@madeleinvillegas - Event-type-generic:

"hiatus": 2310,
  "timestamp": "20230126_214921.193",
  "eventType": "_audioPlaying",
  "eventValue": "IF_YOU_WANT_TO_SEE_A_DIFFERENT_PICTURE_LOGIN"

Is this all-standard-attribute format better than allowing different attributes?

+: single event logger for all event types

JackMostow commented 1 year ago

LogEvent(eventType, eventValue) → LogEvent computes hiatus, timestamp

JackMostow commented 1 year ago

@madeleinvillegas Log Gallery_activity hide and show to track UI changes +: quick and easy (?)