On top my head I know two script that use stat
First : FaF from TM . It tel you how lot of stat per Hr, Sea serpent, Net, pearls.
Second is MWinc, have a lumber and Miner script. Both give you a average /per and also tell you % ratio.
Have a look at those two, maybe you can see where you went wrong.