Outputting Counter Data using PVRScope#

To output counter data using PVRScope, perform the following steps in a loop from 0 to numCounters:

  1. Check if the counter has been updated and only perform steps 2 through 5 if it has.

if(i < counterReading.nValueCnt)     {
  1. Check if the counter is given as a percentage.

bool isPercentage = counterDefinitions[i].bPercentage;
  1. Retrieve the name of the counter.

std::string CounterName = counterDefinitions[i].pszName;
  1. Retrieve the value of the counter.

float counterValue = counterReading.pfValueBuf[i];
  1. Output the value of the counter, such as with printf.

if(isPercentage)     {
    printf("%s : %f%%\n", counterName, counterValue);
} else {
    printf("%s : %f\n", counterName, counterValue);
}