activitywatch icon indicating copy to clipboard operation
activitywatch copied to clipboard

Time active vs Summary Graph: Totals do not match

Open henry2man opened this issue 3 years ago • 8 comments

  • [x] I am on the latest ActivityWatch version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

Current setup:

  • OS name and version: MacOS Monterrey 12.3
  • ActivityWatch version: Version: v0.11.0 and BETA v0.12.0 beta 1 and 0.12.0

Describe the bug

Time active vs Summary Graph: Totals do not match.

To Reproduce

  1. Open AW
  2. Read Time active time
  3. Go to the summary bar graph
  4. Go over current day/week/month (displayed in yellow)
  5. A tooltip is shown with total time.
  6. Error: Times do not match

Expected behavior

I was wondering to have the same times in both places.

Documentation

Some examples (0.11.0):

Captura de Pantalla 2022-03-16 a las 7 19 29 Captura de Pantalla 2022-03-16 a las 7 20 31

With BETA 0.12.0 - beta 1:

Captura de Pantalla 2022-03-16 a las 10 26 04

Additional context

N/A

henry2man avatar Mar 16 '22 06:03 henry2man

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏

github-actions[bot] avatar Mar 16 '22 06:03 github-actions[bot]

Could you try the latest beta release and see if the issue is still there? https://github.com/ActivityWatch/activitywatch/releases/tag/v0.12.0b1

When I test it, my times also differ, but only by ~5%.

ErikBjare avatar Mar 16 '22 07:03 ErikBjare

Could you try the latest beta release and see if the issue is still there https://github.com/ActivityWatch/activitywatch/releases/tag/v0.12.0b1

Unfortunately it seems that the problem is still there:

Captura de Pantalla 2022-03-16 a las 10 26 04

henry2man avatar Mar 16 '22 09:03 henry2man

I could help with the investigation of the problem by looking at the raw data. Is there any utility to do it?

EDIT: I've just found it... but I'm a little bit overwhelmed with the syntax. Could you provide me an example to start with?

EDIT 2: I've manually aggregated aw-watcher-afk_<machinename> bucket assuming that this meter is the one that indicates exactly the time that the equipment is turned on and active (is it so?). The results are clear: the correct value is the one that it's showed in the graph.

This is crucial for me because I'm using AW as project time tracker and measured time is directly translated into customer billing.

henry2man avatar Mar 16 '22 09:03 henry2man

I've checked server logs and I'm also experiencing errors like:

Gap was of negative duration but could be safely merged
...
Gap was of negative duration and could NOT be safely merged

also reported in #626 and #602, so could this be the cause of having different times on both meters?

@ErikBjare Also I've rollback the update to 0.12.0-beta1 because, for an unknown reason, AW stopped to properly show events in the dashboard (going back to 0.11.0 solves the issue)

Captura de Pantalla 2022-03-17 a las 7 01 26

henry2man avatar Mar 17 '22 06:03 henry2man

This is still present in v0.12.0b2. "Time active" seems to be the correct total.

No problems with data visualization in "Timeline (barchart)".

System: Windows 10 21H2

ArthurusDent avatar May 19 '22 12:05 ArthurusDent

This is still present on newest 0.12.0

henry2man avatar Sep 21 '22 11:09 henry2man