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

Inconsistency in tracked times #10

Open
gsabater opened this issue Jul 9, 2019 · 7 comments
Open

Inconsistency in tracked times #10

gsabater opened this issue Jul 9, 2019 · 7 comments

Comments

@gsabater
Copy link

gsabater commented Jul 9, 2019

First of all, i don't know if I should post this here, or in the activitywatch repository, or in the forums.
Anyway, feel free to move the post where you think.

I have been using activity watch with vscode watcher for some time in addition to wakatime, and I have found the following inconsistencies.

Let's take today as an example.
First, in aw, the tracked (non afk) time for vscode is 52m, (1h20m total time with afk time)
code-aw

Then, the time tracked by vscode-watcher is 22minutes.
From those 22minutes, the time tracked by project is the following:
watcher

Now in wakatime, i know their heartbeats are more spaced than activitywatch, but their tracked time is pretty different. 1h47min in total, with this project time:
wakatime

Thanks for your time

@johan-bjareholt
Copy link
Member

I think this is both a case of wakatime being a bit too inclusive and us being a bit too exclusive.
The window time should be accurate, so if it's significantly different from the editor activity something is fishy.

I am maintaining the aw-watcher-vim watcher as well and that has the same issue as this one that it is not inclusive enough I believe and I have some guesses on why, but this one I'm not sure. We would have to investigate a bit to find out.

@gsabater
Copy link
Author

gsabater commented Jul 10, 2019

Thanks for answering @johan-bjareholt

I don't know how your extension or the wakatime extension works, but as far as I know, aw-watcher sends a heartbeat per second, while wakatime sends a heartbeat every 15 minutes? That could be a reason of why wakatime logs much more time.

So, according to you, the most accurate times would be in window, right? That's good to know.

If I can help with anything, just let me know.

@johan-bjareholt
Copy link
Member

johan-bjareholt commented Jul 10, 2019

I don't know how your extension or the wakatime extension works, but as far as I know, aw-watcher sends a heartbeat per second, while wakatime sends a heartbeat every 15 minutes? That could be a reason of why wakatime logs much more time.

So, according to you, the most accurate times would be in window, right? That's good to know.

Correct, that's why I think WakaTime is overshooting while we are undershooting. The window times should be very accurate, if we are far off from them the editor activity is inaccurate.

There are three things which impact the lengths of the editor events and that is:

The pulsetime looks good, the frequency is very often so my first guess would be that our emitters are not good enough and need to be more varied for more types of actions within vscode.

EDIT: Maybe we should increase the heartbeat pulsetime as well, not sure. Will do some testing on aw-watcher-vim what a sane pulsetime for editors is.

@gsabater
Copy link
Author

Frequency looks good to me, it's high but sends data to a local machine so it should be okay.
I think that pulsetime is a little low, as a lot of times a dev can be reading code, or looking something for more time. 45-60s feels more natural to me.

Maybe you could see at which events are registering other trackers like wakatime or software.com
I have seen other events there: onFileCoding onActiveFileChange and onIntentlyWatchingCodes

@johan-bjareholt
Copy link
Member

johan-bjareholt commented Jul 10, 2019

I think that pulsetime is a little low, as a lot of times a dev can be reading code, or looking something for more time. 45-60s feels more natural to me.

@gsabater That depends on how you want to define what time spent coding means. To us (ActivityWatch devs) it means time spent using your editor. If you read code inside your editor that should count (and probably will as you usually move your cursor), if you read documentation in your browser for a longer period of time that should not be included as that would just be a wild guess. If someone wants to have a longer span (for example want to know if they have touched their editor for the past 5 minutes) that could be done through a custom ActivityWatch query afterwards, so we'd prefer to have slightly lower pulsetimes as the "raw data" should be as raw as possible and interpretation and visualization of the raw data then should be possible to do in many different ways.

Maybe you could see at which events are registering other trackers like wakatime or software.com
I have seen other events there: onFileCoding onActiveFileChange and onIntentlyWatchingCodes

Yep, this is probably what we should start with doing and then see what the result becomes. If that's not enough we should consider increasing the pulsetime.

@austil
Copy link

austil commented Dec 14, 2019

Hi there, noticed the exact same issue today. The window watcher is right with 1h41min of work with VSCode while the vs watcher is way behind at 51min. The problem is extremely apparent on the timeline view :

ActivityWatch_vscode_inconsistent

I'm using Activity Watch 0.8.3 & the VS Plugin 0.4.0.

@johan-bjareholt
Copy link
Member

@austil hm, yes in that timeline screenshot it's clear that you are not afk and constantly using the vscode, very likely an issue with how the watcher reports.

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

No branches or pull requests

3 participants