You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Table vs pingtable.pl

Observation

Sadia was working on report and this is what she came across. She was using pingtable.pl for data of 12 months. She found that values are contradictory between table.pl and pingtable.pl. Compare:

They purport to show same statistics. For example from COMSATS to BUITMS throughput is 7829.42 for the month of November. However pingtable.pl is showing 7457.728 whereas table.pl is showing 5523.796.

Reason

The way the two scripts calculate their stats is different. Table.pl averages the average values given for the days of the month. Pingtable.pl gets its data by going back to the average hourly values and averaging them.

The reason for the difference is that the data pingtable.pl uses is pre-calculated, thus the number of data points that have to be crunched will not impact the interactive execution time of the pingtable.pl CGI script. Table.pl on the other hand does not use the precalculated data instead it does the calculation on the fly. To speed it up rather than taking every hours data (i.e. 24 times as much data) it starts from the daily average. There is no reason someone with energy etc. could not modify table.pl to use the precalculated monthly data as pingtable.pl does, so the results would be identical (and table.pl should execute more quickly).

  • No labels