Opened 18 years ago

Closed 16 years ago

Last modified 17 years ago

#233 closed defect (fixed)

[PATCH] Incorrect Stats information and graph on stats page

Reported by: cgardiner Owned by: rjl
Priority: normal Milestone: 1.1.0
Component: General Version: 1.0.0 RC6
Severity: normal Keywords:


I've been looking into the stats features of the new stats branch and have found some inconsistancies. First, it appears that both the total mail items and the suspected ham/spam values are incorrect. In the new stats branch, the total_suspected_ham/spam_items values are ever increasing counters, as are the ham and spam item values. This means that when a suspect_spam is confirmed as spam, the spam counter is increased but the suspect_spam counter stays the same. This is fine except the data collection functions don't seem to have been updated for this. It seems to be expecting that the suspected counters would be decimented when a spam or ham is confirmed.

This is resulting in mails getting counted twice. For example, when looking at my stats for spam and suspected spam, they are showing to be 62% and 68% of the total items. This is obviously incorrect. I have tracked the erros down to the db.php, count_item and the count_total_item functions. I have supplied a patch to db.php, stats.php and chart_stats.php. This seems to have straightened out the issue and has seemed to work correctly in every variant I have tried. IE: with ham cache turned on and fn enabled and with them off. I do not pretend to understand this application well enough yet to be able to say if this is truely fixed, done well, or if my logic is even right.

In addition, I am including a patch to the schema.php and script to add 4 fields to the stats-history table. These are to include the total suspected ham/spam items and size fields. These seem to me to be important fields to have included since certainly with out the total_sus_*_items data, you can never even accurately get a total of the items for a particular data point so most historical calculations would be useless.

Attachments (1) (3.4 KB) - added by anonymous 18 years ago.

Download all attachments as: .zip

Change History (5)

Changed 18 years ago by anonymous

comment:1 Changed 17 years ago by dmorton

Yes, the stats branch is still in development.... that's why it's in a branch... :)

comment:2 Changed 17 years ago by Ed <maia@…>

  • Summary changed from Incorrect Stats information and graph on stats page to [PATCH] Incorrect Stats information and graph on stats page

comment:3 Changed 17 years ago by rjl

  • patch set to 1

comment:4 Changed 16 years ago by dmorton

  • Milestone set to 1.1.0
  • Resolution set to fixed
  • Status changed from new to closed

I think this has been fixed, and is now merged with the rest of the per-

address stats into trunk.

Note: See TracTickets for help on using tickets.