Wrong statistics

Hello

Sometimes wrong statistics :
Only few dates displayed, grouped stats (see picture) ?

Sometimes good statistics :
Each date displayed, good stats.

Discourse : 2.1.0.beta4
Of course form re-submit after date choice.

Sorry I am unclear, what is wrong about this? It looks fine to me?

I see only 6 markers for the 7 week range.

This suggests that there were no user visits for the days that don’t have markers. @Jean-Michel25 do you know for a fact there were user visits for those other days? Is there any reason that you can think of that might explain why the counts are “rolled up” into weekly instead of daily? Why nothing is displayed for Aug 8 to Aug 21?

3 Likes

Before I dig too much, can you try to update to latest please ?

4 Likes

I check the stats every day.
Always over 100 users / day.

Sometimes I’ve 1 marker / day, sometimes only a few in the range…

This morning I try to give you printscreen of the 2 ways

I can reproduce easyly the problem :

I try all the dates for the 1st param, from 2018-07-01 and up day by day.
Each time, of course, I update (twice or more).
The markers are ok for 2018-07-14 and plus (15, 16…).
The markers are KO for 2018-07-13 and less (12, 11…)

And the “table” display is according to graph.

1 Like

Ok I see what’s going on :+1: will push a fix today thx

1 Like

Ok this is actually not a bug on dates, but our collapseWeekly() code will do this when there are more than 40 data points to make it easier to read.

@sam I feel like we should change it, to make sure it shows first and last date of the range, what do you think? Otherwise it can be disturbing.

3 Likes

OK thanks for this

It would be is usefull having somewhere day average.
Maybe a hover popup on markers ?

Whilst we’re looking at the dashboard … this is what I have this morning after upgrading last night (to v2.1.0.beta5 +7). Is this just a case of Sidekiq not having caught up? (but I see some Dashboard jobs have run).

What are you talking of exactly? Something looks totally wrong?

Yesterday = Last 7 = Last 30

Interestingly, even before the upgrade, Last 7 equalled last 30 and there were odd hover stats saying "0 for previous 30 days "

Hope that helps.

Many thanks for looking into it.

PPS It doesn’t look like I’ve lost any history because historical graphs are fine. Just the dashboard aggregation seems odd.

Indeed, looks weird, will look.

3 Likes

I just checked the SitePoint dashboard. It displays the same Y = 7 = 30 oddness.

1 Like

Ok this should be fixed by:

https://github.com/discourse/discourse/commit/87d443f070582351c211efff989adee39449c30c

I also added a test for this, time based tests are kind of complicated on the client side ATM (while being very easy on server side). I gave it a shot to ensure we are not regressing on this again in the future, this test might have erratic behaviour. I will track it in the next days and the next blood moon as it’s usually when time based tests fail…

Thanks for reporting this.

:information_source: only the counters bug is fixed. The other question about collapsing chart is still being discussed internaly.

7 Likes

That’s fixed it thanks.

Unfortunately it still tells me “Was 0 in the previous 30 day period” on the hover tooltip for Last 30.

But a big bug fixed, thank you!

Yes I’m aware of this. It’s not a bug, it’s simply that “prev30days” is not implemented for this report. It will work for some reports if you look closely.

However, I feel like I should just better handle this so I pushed this commit:

If there’s no prev30days data in the report, it won’t show the trending icons anymore. This commit has also an example of how to add this to a report. pr-welcome if someone wants to add it to other reports.

5 Likes