1. A method of measuring a performance of a program running on a processing unit of a processing system, the method comprising: informing a logic unit of each instruction in the program that is executed by the processing unit; assigning a weight to said each instruction; assigning the instructions to a plurality of groups; and analyzing said plurality of groups to measure one or more metrics of the program.