You are here: Foswiki>Tasks Web>Item2306 (02 Dec 2012, GeorgeClark)Edit Attach

Item2306: WebStatistics calculates wrong numbers

Priority: Normal
Current State: Closed
Released In: 1.1.6
Target Release: patch
Applies To: Engine
Branches: Release01x01 trunk
Reported By: AndreUlrich
Waiting For: Main.OlivierRaginel
Last Change By: GeorgeClark
When creating WebStatistic for a given month and there are log files from more current months it will sum up all values. The script simply does not stop and fetch all later log files in order to calculate the given month.

-- AndreUlrich - 29 Oct 2009

Just over the same issue. This issue is caused by using the EachEventSince function in So ".statistics -logdate 201001" could not work. A range has to be defined for getting it working properly.

-- AndreUlrich - 01 Jun 2010

Andre, I'm sorry, I just don't understand the report. What do you mean by "A range has to be defined for getting it working properly"? If you understand the issue, what fix do you propose?

-- CrawfordCurrie - 25 Jun 2010

A solution would be a new function which has a start and an end date. At the moment we only have EachEventSince which collects all date from a start date but will not stop until there are no logfiles left. In this way you cannot update statistics for a given period.

-- AndreUlrich - 25 Jun 2010

eachEventSince is an iterator, and you can stop an iterator whenever you want. All the called has to do is to inspect the event, and break the loop if it's out of range. No need for a new function.

-- CrawfordCurrie - 28 Jun 2010

Bumping this up, as it is still the case. I wanted to re-process statistics after a migration, and it is not possible, as the statistics code will simply sum up all values for the entire period. To be more specific, let's draw a table:
Month Real Views View in WebStatistics
01.2012 21 718
02.2012 121 697
03.2012 221 576
04.2012 321 355
05.2012 34 34
Total 718 %CALC{ "$SUM($ABOVE())" %}

Assuming this was done using: (simulated)
for i in 1 2 3 4 5;do ./statistics -logdate 20120$i; done

Might be easy to fix, as Crawford seems to imply.

-- OlivierRaginel - 14 May 2012

Should be fixed. My tests were successful. Andre, if you could test it and re-open if not working...

-- OlivierRaginel - 14 May 2012

ItemTemplate edit

Summary WebStatistics calculates wrong numbers
ReportedBy AndreUlrich
Codebase 1.1.5, 1.0.7, trunk
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Priority Normal
CurrentState Closed
WaitingFor OlivierRaginel
Checkins distro:17ceb371ec24 distro:941f3a6b9493
TargetRelease patch
ReleasedIn 1.1.6
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:17ceb371ec24
Release01x01Checkins distro:941f3a6b9493
Topic revision: r10 - 02 Dec 2012, GeorgeClark - This page was cached on 09 Jan 2018 - 19:38.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License