is there an API for analying yourkit snapshot (memory/cpu)?

Questions about YourKit Java Profiler
Post Reply
jayanmn
Posts: 2
Joined: Mon Mar 10, 2014 6:39 am

is there an API for analying yourkit snapshot (memory/cpu)?

Post by jayanmn »

cross Posting from my[http://stackoverflow.com/questions/2224 ... memory-cpu] SO question. [/url]

YourKit gives an easy to use API to capture memory /cpu snapshot(Thank you!)

I could not find API for analysing the captured data. Is there a yourkit API for analyzing captured data?
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Re: is there an API for analying yourkit snapshot (memory/cp

Post by Vladimir Kondratyev »

There is API which allows to query memory snapshots. See JavaDoc of MemorySnapshot class http://www.yourkit.com/docs/java/api/co ... pshot.html and Set Description Language http://www.yourkit.com/docs/java/help/language.jsp

Also you can export snapshot data for further analyzes http://www.yourkit.com/docs/java/help/export.jsp

Which API do you need? Which task do you solve?
jayanmn
Posts: 2
Joined: Mon Mar 10, 2014 6:39 am

Re: is there an API for analying yourkit snapshot (memory/cp

Post by jayanmn »

That takes care of Memory. I could not find anything for CPU statistics. Am I correct?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: is there an API for analying yourkit snapshot (memory/cp

Post by Anton Katilin »

To access CPU statistics please use export:
http://www.yourkit.com/docs/java/help/export.jsp

Please note there is a command line tool to perform export, which enables automatic analysis of the results.
yuman
Posts: 16
Joined: Sat Jun 11, 2011 4:49 am

Re: is there an API for analying yourkit snapshot (memory/cp

Post by yuman »

For memory, the export generates a file Class-instance-statistics, which is like the output of 'jmap -histo' -- not sure if it had the ':live' option.
For CPU, the export generates files Method-list--CPU and Call-tree--all-threads-together, among others.

I am working on automating the analyses of large numbers of those files.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: is there an API for analying yourkit snapshot (memory/cp

Post by Anton Katilin »

Sorry, I didn't get your question.
Post Reply