here works: PROCEDURE InitProfiler( lInfo )
STATIC oProfile IF Empty( oProfile ) __setProfiler( .T. ) oProfile := HBProfile():New() // New() is a default method in the class system that calls :init() to initialize the object // Turn on profiling. __setProfiler( .T. ) ENDIF DEFAULT lInfo := .F. IF lInfo // Take a profile snapshot. oProfile:gather() /* // Report on calls greater than 0 !! "Todos los metodos y funciones llamados una o mas veces, ordenados por LLAMADAS" !! HBProfileReportToString():New( oProfile:callSort() ):generate( {|o| ValType( o:nCalls ) == 'N' .AND. o:nCalls > 0 } ) // Sorted by name !! "Todos los metodos y funciones llamados una o mas veces, ordenados por NOMBRE" !! HBProfileReportToString():New( oProfile:nameSort() ):generate( {|o| ValType( o:nCalls ) == 'N' .AND. o:nCalls > 0 } ) */ // Ordenado por : nTicks / nCalls mostrando sólo valores > 1 !! "Todos los metodos y funciones llamados una o mas veces, ordenados por TIEMPO" aEval( HBProfileReportToArray():New( oProfile:Sort( {|a,b| a:nMeanTicks > b:nMeanTicks } ) ):generate( {|o| o:nMeanTicks > 1 } ),; {|e| __OutDebug( e ) } ) // TBrowse all calls greater than 0 // "TBrowse all methods/functions called one or more times" // oProfile:callSort() // Some closing stats !! "Totals" !! " Total Calls: " + Str( oProfile:totalCalls() ) !! " Total Ticks: " + Str( oProfile:totalTicks() ) !! "Total Seconds: " + Str( oProfile:totalSeconds() ) ENDIF RETURN Luis Krause Mantilla escribió: > Hi: > > I'm trying to use the profiler but the app dies as soon as I attempt to > use it. > > I first rebuilt xharbour using -DHB_USE_PROFILER > Then I build our app using fmstat.lib > > I create an hbProfile object and then call > __setProfiler( .F. ) > > anything I do after (click on a menu, or a button to open a process), > the app dies. > > Do I need to use additional flags? add other libs? cross my fingers? > > Thanks! > ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers