Page 1 of 1

Download counters are misleading

Posted: January 15th, 2013, 1:56 pm
by Cpuroast
Hi Shypike,

Consider the following:

Server Page
--------------
Bandwidth:
Today: 594 MB
This week: 594 MB
This month: 594 MB

Main Page
------------
724 MB Today 724 MB This week 724 MB This month

I find that the terms used above are misleading.

If my understanding of how sab's counters work is correct, "Today" means an arbitrary 24 hours starting from when Sab was launched, "This week" means an arbitrary 7x24hours and finally, "This month" means an arbitrary 30x24hours.

Without prior observation of Sab's behavior, I would be under the impression that "Today" actually meant current day, starting at midnight and ending at 11:59:59, this applies with the 2 other values as well, as in "This week" meant the actual current week and "This month" meant the actual current month.

I suggest 2 ways of making it clearer:

1. Simply changing the labels, "Today" would become "24 Hours", "This week" would become "7 Days" and "This month" would become "30 Days". This would make it so that it is no longer implied that the values reflect the current day, week and month.

2. Re-work the counter mechanism, so that Sab follows the actual calendar, meaning that if I downloaded 100MB at 3PM, the "Today" value would get reset to 0 at midnight and not at 3PM the next day. "This week" would start and end on the correct actual day of the week, and same with "This month". This would also have to take into consideration months that have 28,29,30 or 31 days.

Thanks as always for this awesome app!

Re: Download counters are misleading

Posted: January 15th, 2013, 2:18 pm
by shypike
The terms have their common meaning.
"Today" is since last midnight.
"This month" started on the first of this month.
"This week" started on Monday.

"This month" is the way most ISP quota work.

Re: Download counters are misleading

Posted: January 15th, 2013, 2:31 pm
by Cpuroast
shypike wrote:The terms have their common meaning.
"Today" is since last midnight.
"This month" started on the first of this month.
"This week" started on Monday.

"This month" is the way most ISP quota work.
So they use the common meaning, however there might be an issue with it.

This morning I checked sab, it said I downloaded 1.7GB Today, when I hadn't downloaded a single byte since midnight.
I then reset all counters and then downloaded 724MB. It currently indicates:

724 MB Today 724 MB This week 724 MB This month 724 MB Total

Tomorrow morning the expect display, if I don't download anything, should be the following?

0 MB Today 724 MB This week 724 MB This month 724 MB Total

Re: Download counters are misleading

Posted: January 15th, 2013, 3:29 pm
by shypike
Cpuroast wrote: Tomorrow morning the expect display, if I don't download anything, should be the following?
0 MB Today 724 MB This week 724 MB This month 724 MB Total
That's what it should show, given that it's now Tuesday, Jan 15.

Re: Download counters are misleading

Posted: January 15th, 2013, 3:31 pm
by Cpuroast
shypike wrote:
Cpuroast wrote: Tomorrow morning the expect display, if I don't download anything, should be the following?
0 MB Today 724 MB This week 724 MB This month 724 MB Total
That's what it should show, given that it's now Tuesday, Jan 15.
If it does not reset back to 0, I'll report back, I've seen this happen too many times where the "Today" value is totally off and does not at all reflect what I downloaded that day.

Re: Download counters are misleading

Posted: January 16th, 2013, 11:12 am
by Cpuroast
Well it's 11:10AM on Wednesday, I have not downloaded anything since yesterday and it still says:

724 MB Today 724 MB This week 724 MB This month 724 MB Total

So the "Today" value has not reset to 0.

Version: 0.7.9
Uptime: 6d

Re: Download counters are misleading

Posted: January 17th, 2013, 9:12 am
by Cpuroast
It's now 9:11 AM on Thursday, I have not downloaded anything since Tuesday and it still says:

724 MB Today 724 MB This week 724 MB This month 724 MB Total

Which leads to me to believe there is something very wrong in the counter system, if after 2 days of not downloading, the "Today" value still indicates an amount.

Version: 0.7.9
Uptime: 7d

Re: Download counters are misleading

Posted: January 17th, 2013, 12:24 pm
by Cpuroast
It seems that sab's Today counter will never reset to 0, until you download something else.

It will simply indicate "Today 724MB" till the end of time and never cycle back to 0.

Re: Download counters are misleading

Posted: January 17th, 2013, 12:28 pm
by Cpuroast
[12:26:13] <Cpuroast> so if counters are at 0
[12:26:19] <Cpuroast> you download 600MB
[12:26:28] <Cpuroast> on a Monday
[12:26:45] <Cpuroast> it indicates : Today 600MB
[12:27:02] <Cpuroast> you don't download anything after that
[12:27:05] <Cpuroast> weeks go by
[12:27:12] <Cpuroast> it will still indicate Today 600MB

Re: Download counters are misleading

Posted: January 17th, 2013, 1:42 pm
by shypike
Yeah, there's something wrong.
I'll look into it.

Re: Download counters are misleading

Posted: January 17th, 2013, 2:48 pm
by shypike
The cause is a bit funny.
The byte counters are only updated when new bytes come in.
In idle mode, it never gets a trigger to update; it sleeps through midnight.
As soon as the first byte of the day comes in, the counter are set to the proper value.
It does work OK when SABnzbd is not running during midnight hour.
Shouldn't be too hard to fix.