google / paco

The Paco behavioral science mobile research platform
http://www.pacoapp.com/
Apache License 2.0
327 stars 93 forks source link

Add 3 Desktop Data Logger Group Types #1675

Closed BobEvans closed 4 years ago

BobEvans commented 4 years ago

To support desktop research, we are adding three new Group Types (Data Collector Types): APPUSAGE_DESKTOP, APPUSAGE_SHELL, IDE_IDEA_USAGE The last one is IDE logging for IDEA-based IDEs, e.g., IntelliJ, Android Studio, CLion, etc.

The PR defines types in GroupTypeEnum and also creates a server migration job to populate the predefined inputs for the data collectors in the sql tables.

One question I have is what are the predefined Inputs for data collection. This is an optional feature that can help with some server side display and analysis functions. For example for the APPUSAGE_Android data collector, it always collects 5 variables APPS_USED, APPS_USED_RAW, FOREGROUND, USER_PRESENT, USER_NOT_PRESENT.

I have all three of the new collectors the same. I am not sure if that is right for the shell collector as I haven't seen output for the shell collector yet. Also, I am unsure if it makes sense or is possible for it to record user present/user_not_present events. I am not sure if it can collect Foreground either.

As a note, additional fields created by the input do not need to be predefined. It is just a bonus, especially non open-text types, because we can then provide more analytical options based on those better defined types (as compared to String types, the default).

stiffsteve commented 4 years ago

Currently for desktop app usage we have APPS_USED, APPS_USED_RAW, and APP_CONTENT. APPS_USED_RAW is the full window data, split into APPS_USED, the app name, and APP_CONTENT, the rest of the window title. Here are some examples:

APPS_USED_RAW = taqo:taqo
APPS_USED = taqo
APP_CONTENT = taqo
APPS_USED_RAW = Xfce4-terminal:Terminal - mike@debian: ~
APPS_USED = Xfce4-terminal
APP_CONTENT = Terminal - mike@debian: ~

For CLI, it's UID, PID, RETVAL, and CMD_RAW, but I think I made these up on my own. Examples:

UID = mike
PID = 1881
CMD_RET = 0
CMD_RAW = ~/flutter/bin/flutter run -d linux
stiffsteve commented 4 years ago

To answer your question directly, since we're polling the foreground window, I'm not sure it currently makes sense to have USER_PRESENT etc.

Perhaps we can switch to a different source? Or maybe there's too much going on in the background on desktop to weed out what we probably want.

BobEvans commented 4 years ago

I'll see if we can have a quick chat about this tomorrow.

stiffsteve commented 4 years ago

Note to discuss: do we want to add new interrupt cue types as well?

BobEvans commented 4 years ago

Note to discuss: do we want to add new interrupt cue types as well?

Yes. I have a separate PR where I am starting that. I made a comment on your trigger PR about some of this and some of the unknowns.