public String getMethodCsv ( ) { stopCollecting ( ) ; StringBuilder buff = new StringBuilder ( ) ; buff . append ( "Method,Self" ) . append ( LINE_SEPARATOR ) ; for ( String k : new TreeSet < String > ( selfMethods . keySet ( ) ) ) { int percent = 100 * selfMethods . get ( k ) / Math . max ( total , 1 ) ; buff . append ( k ) . append ( "," ) . append ( percent ) . append ( LINE_SEPARATOR ) ; } return buff . toString ( ) ; }
Stop and obtain the self execution time of methods each as a row in CSV format .