protected void populateCounterValues ( Map < String , Metric > operations , Map < String , Counter > rpcInvocations , HttpServletRequest request ) { for ( Map . Entry < String , Metric > entry : operations . entrySet ( ) ) { if ( entry . getValue ( ) instanceof Gauge ) { request . setAttribute ( entry . getKey ( ) , ( ( Gauge < ? > ) entry . getValue ( ) ) . getValue ( ) ) ; } else if ( entry . getValue ( ) instanceof Counter ) { request . setAttribute ( entry . getKey ( ) , ( ( Counter ) entry . getValue ( ) ) . getCount ( ) ) ; } } for ( Map . Entry < String , Counter > entry : rpcInvocations . entrySet ( ) ) { request . setAttribute ( entry . getKey ( ) , entry . getValue ( ) . getCount ( ) ) ; } }
Populates operation metrics for displaying in the UI .