+

Search Tips   |   Advanced Search


Add custom counters to reports

You can add custom counters to performance reports with custom code.

With the following code, you can add a custom counter. After running tests, drag the custom counter from the results onto the report where to display the custom counter.

IStatisticsManager sm = tes.getStatisticsManager();
IStatTree st = sm.getStatTree();

IScalar myCounter = (IScalar) st.getStat("mystatcounter", StatType.SCALAR);
myCounter.increment();