arbtt-stats output of duration

Issue #30 resolved
amenthes
created an issue

When i run arbtt-stats, i get a table like this one:

 ./dist/build/arbtt-stats/arbtt-stats --intervals Program: --logfile tests/gap-handling.log --categorizefile tests/gap-handling-withidle.cfg
Intervals for category "Program"                                                                                          
================================
__________________Tag_|______________From_|_____________Until_|__Duration_
gnome-terminal-server | 09/20/15 14:24:03 | 09/20/15 14:25:12 |     2m09s
            Navigator | 09/20/15 14:25:22 | 09/20/15 14:50:41 |    25m29s
            Navigator | 09/20/15 14:55:31 | 09/20/15 14:55:31 |       10s
gnome-terminal-server | 09/20/15 14:55:41 | 09/20/15 18:52:07 |  3h56m36s
            Navigator | 09/20/15 18:52:17 | 09/20/15 18:53:45 |     1m38s
gnome-terminal-server | 09/20/15 18:53:55 | 09/20/15 18:54:15 |       30s

The duration does not seem to fit to the interval reported. In most cases, it's 10 seconds longer (which may be intentional, this is my recording interval, and it's probably filling the "gap"). But every once in a while the output does not match at all.

The first line in the table is 24:03 to 25:12, which is 1 minute 9 seconds, or maybe 1 minute 19 seconds including the trailing piece of the sample. But it is reported as 2 minutes 09 seconds. This line is wrong in a way i don't understand. This is why i'm labeling this as a bug.

The third line is reads from same timestamp to same timestamp, but then reports a duration of 10 seconds. Now, this may be intentional, but i still think that the "until" timestamp should be displaying the estimated end in this case.

Comments (8)

  1. nomeata repo owner

    Ah, again the intervals report... :-)

    The third line is explainable: It seems that my code is listing the start times of the samples, even in the until column, but adding up the duration based on the sample rate. That should be fixable easily.

    The first line is weird indeed. Is there any chance that you had multiple arbtt-capture instances running at the same time?

  2. amenthes reporter

    Here's a nice comparison of the stats-0.6 (top) and stats-0.9.0.7+ (bottom) on windows. For my personal use (I tend to switch windows a lot), it can't be overstated how much better the output has become.

    arbtt-stats-end-change.png

    Thanks again!

  3. Log in to comment