integrating profiler4j

Help
smirk
2007-03-02
2013-04-24
  • smirk

    smirk - 2007-03-02

    Is there any api documentation? i would like to integrate profiler4j in my app.

     
    • Antonio S. R. Gomes

      Which kind of integration you need? If all you want is collect profiling data from the application itself this seems feasible. Take a look at the class net.sf.profiler4j.console.client.Client. It implements all features the graphical console uses to control the remote agent. You can then start your application (including the profiler agent) and connect to it from the same JVM. Checkout the lastest sources a give it a try.

      This is the client API (not intended for general use but it is stable enough to play with)

      class Client {

          public synchronized void connect(String host, int port) throws ClientException
         
          public synchronized boolean isConnected()
         
          public synchronized void disconnect() throws ClientException
         
          public synchronized void reset() throws ClientException

          public synchronized RuntimeInfo getRuntimeInfo() throws ClientException

          public synchronized MemoryInfo getMemoryInfo() throws ClientException
         
          public synchronized boolean[] setThreadMonitoring(boolean threadMonitoring,
                                                            boolean cpuTimeMonitoring)
              throws ClientException
             
          public synchronized ThreadInfo[] getThreadInfo(long[] ids, int maxDepth)
              throws ClientException

          public synchronized Snapshot getSnapshot() throws ClientException

          public void runGc() throws ClientException

          public synchronized void restoreClasses(ProgressCallback callback)
              throws ClientException
             
          public void applyRules(String rules,
                                 String defaultRuleOptions,
                                 ProgressCallback callback) throws ClientException

          public synchronized ClassInfo[] listLoadedClasses() throws ClientException

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks